forked from scionproto/scion
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (25 loc) · 945 Bytes
/
Dockerfile
File metadata and controls
31 lines (25 loc) · 945 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM scion_base:latest
ARG SCION_UID
ARG SCION_GID
ARG DOCKER_GID
ARG GIT_VERSION
ARG GIT_TAG
ENV GIT_VERSION=${GIT_VERSION}
ENV GIT_TAG=${GIT_TAG}
# Make sure the scion user has the same UID/GID as the user on the host
USER root
RUN usermod -u ${SCION_UID:?} scion
RUN groupmod -g ${SCION_GID:?} scion
# Make sure the docker group has the same GID as the group on the host
RUN groupmod -g ${DOCKER_GID:?} docker
RUN find ~scion -not -user scion -execdir chown scion {} \+
USER scion
# Now copy over the current branch
COPY --chown=scion:scion . $BASE/
# Restore the python dependency cache from scion_base
RUN tar xf /scioncache/python_local.tar.gz -C ~
# Restore the cache of Bazel dependencies
# Bazel creates timestamps 10 years in the future, so let's not warn about that.
RUN tar xf /scioncache/bazel.tar.gz -C ~ --warning=no-timestamp
# Make sure dependencies haven't been changed since scion_base was rebuilt
RUN docker/deps_check