File tree 4 files changed +10
-78
lines changed
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"
29
29
30
30
ENV NODE_ENV production
31
31
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
38
35
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
41
38
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
45
41
46
- COPY --chown=snyk:snyk --from=rpmdb-build /go/src/github.com/snyk/go-rpmdb/rpmdb /usr/bin/rpmdb
42
+ WORKDIR /root
47
43
48
44
# 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 ./
50
46
51
47
RUN npm install
52
48
53
49
# add the rest of the app files
54
- ADD --chown=snyk:snyk . .
50
+ ADD . .
55
51
56
52
# Complete any `prepare` tasks (e.g. typescript), as this step ran automatically prior to app being copied
57
53
RUN npm run prepare
Original file line number Diff line number Diff line change 57
57
limits :
58
58
cpu : ' 1'
59
59
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
70
60
securityContext : {}
71
61
volumes :
72
62
- name : docker-config
Original file line number Diff line number Diff line change 51
51
limits :
52
52
cpu : ' 1'
53
53
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
64
54
volumes :
65
55
- name : docker-config
66
56
secret :
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments