Skip to content

Commit

Permalink
Docker: do not copy source code to docker image
Browse files Browse the repository at this point in the history
map it to container, so userpatch/output no need map from container

Signed-off-by: Zhang Ning <832666+zhangn1985@users.noreply.github.com>
  • Loading branch information
zhangn1985 committed Apr 11, 2019
1 parent 951f914 commit 5b9d211
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y dist-upgrade &&
RUN locale-gen en_US.UTF-8
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' TERM=screen
WORKDIR /root/armbian
COPY . /root/armbian
ENTRYPOINT [ "/bin/bash", "/root/armbian/compile.sh" ]
6 changes: 3 additions & 3 deletions config-docker.conf
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ else
display_alert "and will be able to create only Kernel and u-boot packages (KERNEL_ONLY=yes)" "" "wrn"
fi

# map source to Docker Working dir.
DOCKER_FLAGS+=(-v=$SRC/:/root/armbian/)

# mount 2 named volumes - for cacheable data and compiler cache
DOCKER_FLAGS+=(-v=armbian-cache:/root/armbian/cache -v=armbian-ccache:/root/.ccache)

# mount 2 local directories - output and userpatches
DOCKER_FLAGS+=(-v=$SRC/output:/root/armbian/output -v=$SRC/userpatches:/root/armbian/userpatches)

# pass other command line arguments like KERNEL_ONLY=yes, KERNEL_CONFIGURE=yes, etc.
# pass "docker-guest" as an additional config name that will be sourced in the container if exists
display_alert "Running the container" "" "info"
Expand Down

0 comments on commit 5b9d211

Please sign in to comment.