Skip to content

Commit b64d94b

Browse files
authored
Merge pull request #550 from snyk/fix/build_server
[RUN-1122] fix: update dockerfile so it works on Red Hat Build Server
2 parents 538e40f + 92bf2d9 commit b64d94b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ RUN groupadd -g 10001 snyk
3434
RUN useradd -g snyk -d /srv/app -u 10001 snyk
3535

3636
WORKDIR /srv/app
37-
USER 10001:10001
3837

3938
COPY --chown=snyk:snyk --from=skopeo-build /usr/bin/skopeo /usr/bin/skopeo
4039
COPY --chown=snyk:snyk --from=skopeo-build /etc/containers/registries.d/default.yaml /etc/containers/registries.d/default.yaml
@@ -56,6 +55,10 @@ ADD --chown=snyk:snyk . .
5655
# OpenShift 4 doesn't allow dumb-init access the app folder without this permission.
5756
RUN chmod 755 /srv/app && chmod 755 /srv/app/bin && chmod +x /srv/app/bin/start
5857

58+
# This must be in the end for Red Hat Build Service
59+
RUN chown -R snyk:snyk .
60+
USER 10001:10001
61+
5962
# Complete any `prepare` tasks (e.g. typescript), as this step ran automatically prior to app being copied
6063
RUN npm run prepare
6164

0 commit comments

Comments
 (0)