chore(docker): relocate module files in the final image
/usr/local/src sounds like a better place than /opt Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
This commit is contained in:
parent
e49f6661f3
commit
fade69b5ae
1 changed files with 4 additions and 4 deletions
|
@ -36,14 +36,14 @@ RUN apk add --no-cache --update ca-certificates openssl
|
||||||
RUN mkdir -p /var/dex
|
RUN mkdir -p /var/dex
|
||||||
RUN chown -R 1001:1001 /var/dex
|
RUN chown -R 1001:1001 /var/dex
|
||||||
|
|
||||||
|
# Copy module files for CVE scanning / dependency analysis.
|
||||||
|
COPY --from=0 /usr/local/src/dex/go.mod /usr/local/src/dex/go.sum /usr/local/src/dex/
|
||||||
|
COPY --from=0 /usr/local/src/dex/api/v2/go.mod /usr/local/src/dex/api/v2/go.sum /usr/local/src/dex/api/v2/
|
||||||
|
|
||||||
USER 1001:1001
|
USER 1001:1001
|
||||||
|
|
||||||
COPY --from=0 /go/bin/dex /usr/local/bin/dex
|
COPY --from=0 /go/bin/dex /usr/local/bin/dex
|
||||||
|
|
||||||
# Copy module dependencies for CVE scanning / dependency analysis.
|
|
||||||
COPY go.mod go.sum /opt/dex/dependencies/
|
|
||||||
COPY api/v2/go.mod api/v2/go.sum /opt/dex/dependencies/api/v2/
|
|
||||||
|
|
||||||
# Import frontend assets and set the correct CWD directory so the assets
|
# Import frontend assets and set the correct CWD directory so the assets
|
||||||
# are in the default path.
|
# are in the default path.
|
||||||
COPY web web
|
COPY web web
|
||||||
|
|
Reference in a new issue