Skip to content

Commit 0b05aee

Browse files
authored
Merge pull request #191 from snyk/fix/revert-secure-config
feat: Revert "Merge pull request #188 from snyk/feat/update-secure-config"
2 parents 397cf8a + 0145e23 commit 0b05aee

File tree

4 files changed

+10
-78
lines changed

4 files changed

+10
-78
lines changed

Dockerfile

+10-14
Original file line numberDiff line numberDiff line change
@@ -29,29 +29,25 @@ LABEL maintainer="Snyk Ltd"
2929

3030
ENV 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

5147
RUN 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
5753
RUN npm run prepare

snyk-monitor-deployment.yaml

-10
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,6 @@ spec:
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

snyk-monitor/templates/deployment.yaml

-10
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,6 @@ spec:
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:

test/unit/deployment-files.test.ts

-44
This file was deleted.

0 commit comments

Comments
 (0)