contrib: move context to repository root, use additional context for copy

This commit is contained in:
Kittywhiskers Van Gogh 2023-06-25 03:11:04 +05:30
parent 38b8344ea5
commit ddb38f42da
2 changed files with 8 additions and 6 deletions

View File

@ -74,10 +74,10 @@ RUN usermod -aG sudo ${USERNAME} && \
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
# Copy required files to container
COPY ./motd.txt /etc/motd
COPY ./scripts/entrypoint /usr/local/bin/entrypoint
COPY ./scripts/guix-check /usr/local/bin/guix-check
COPY ./scripts/guix-start /usr/local/bin/guix-start
COPY --from=docker_root ./motd.txt /etc/motd
COPY --from=docker_root ./scripts/entrypoint /usr/local/bin/entrypoint
COPY --from=docker_root ./scripts/guix-check /usr/local/bin/guix-check
COPY --from=docker_root ./scripts/guix-start /usr/local/bin/guix-start
# Create directory for mounting and grant necessary permissions
RUN mkdir -p /src/dash && \

View File

@ -2,8 +2,10 @@ version: "3.9"
services:
guix_ubuntu:
build:
context: '.'
dockerfile: './Dockerfile'
context: '../../..'
additional_contexts:
- docker_root=.
dockerfile: './contrib/containers/guix/Dockerfile'
args:
USER_ID: 1000 # set this to $(id -u) of the host
GROUP_ID: 1000 # set this to $(id -g) of the host