File tree Expand file tree Collapse file tree 4 files changed +10
-78
lines changed Expand file tree Collapse file tree 4 files changed +10
-78
lines changed Original file line number Diff line number Diff line change @@ -29,29 +29,25 @@ LABEL maintainer="Snyk Ltd"
2929
3030ENV NODE_ENV production
3131
32- RUN apk update
33- RUN apk upgrade
34- RUN apk --no-cache add db
35-
36- RUN addgroup -S -g 10001 snyk
37- RUN adduser -S -G snyk -h /srv/app -u 10001 snyk
32+ COPY --from=skopeo-build /usr/bin/skopeo /usr/bin/skopeo
33+ COPY --from=skopeo-build /etc/containers/registries.d/default.yaml /etc/containers/registries.d/default.yaml
34+ COPY --from=skopeo-build /etc/containers/policy.json /etc/containers/policy.json
3835
39- WORKDIR /srv/app
40- USER snyk:snyk
36+ RUN apk --no-cache add db
37+ COPY --from=rpmdb-build /go/src/github.com/ snyk/go-rpmdb/rpmdb /usr/bin/rpmdb
4138
42- COPY --chown=snyk:snyk --from=skopeo-build /usr/bin/skopeo /usr/bin/skopeo
43- COPY --chown=snyk:snyk --from=skopeo-build /etc/containers/registries.d/default.yaml /etc/containers/registries.d/default.yaml
44- COPY --chown=snyk:snyk --from=skopeo-build /etc/containers/policy.json /etc/containers/policy.json
39+ RUN apk update
40+ RUN apk upgrade
4541
46- COPY --chown=snyk:snyk --from=rpmdb-build /go/src/github.com/snyk/go-rpmdb/rpmdb /usr/bin/rpmdb
42+ WORKDIR /root
4743
4844# Add manifest files and install before adding anything else to take advantage of layer caching
49- ADD --chown=snyk:snyk package.json package-lock.json .snyk ./
45+ ADD package.json package-lock.json .snyk ./
5046
5147RUN npm install
5248
5349# add the rest of the app files
54- ADD --chown=snyk:snyk . .
50+ ADD . .
5551
5652# Complete any `prepare` tasks (e.g. typescript), as this step ran automatically prior to app being copied
5753RUN npm run prepare
Original file line number Diff line number Diff line change 5757 limits :
5858 cpu : ' 1'
5959 memory : ' 2Gi'
60- securityContext :
61- runAsUser : 10001
62- runAsGroup : 10001
63- privileged : false
64- runAsNonRoot : true
65- allowPrivilegeEscalation : false
66- readOnlyRootFilesystem : false
67- capabilities :
68- drop :
69- - ALL
7060 securityContext : {}
7161 volumes :
7262 - name : docker-config
Original file line number Diff line number Diff line change 5151 limits :
5252 cpu : ' 1'
5353 memory : ' 2Gi'
54- securityContext :
55- runAsUser : 10001
56- runAsGroup : 10001
57- privileged : false
58- runAsNonRoot : true
59- allowPrivilegeEscalation : false
60- readOnlyRootFilesystem : false
61- capabilities :
62- drop :
63- - ALL
6454 volumes :
6555 - name : docker-config
6656 secret :
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments