Remove root user from Dockerfiles

This commit is contained in:
Simon Larsen
2024-02-16 07:40:22 +00:00
parent 82e30a0a04
commit 519daba294
12 changed files with 5 additions and 12 deletions

View File

@@ -4,7 +4,6 @@
# Pull base image nodejs image.
FROM node:21.6-alpine3.18
USER root
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global

View File

@@ -4,7 +4,6 @@
# Pull base image nodejs image.
FROM node:21.6-alpine3.18
USER root
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global

View File

@@ -4,7 +4,6 @@
# Pull base image nodejs image.
FROM node:21.2-alpine3.18
USER root
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global

View File

@@ -4,7 +4,6 @@
# Pull base image nodejs image.
FROM node:21.6-alpine3.18
USER root
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global

View File

@@ -1,4 +1,7 @@
FROM fluentd
# This container will only run in dev env, so this is ok.
USER root
# Install bash and curl.
RUN apk add --update --no-cache bash curl
RUN apk add bash curl

View File

@@ -1,5 +1,5 @@
FROM node:21.6-alpine3.18
USER root
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global

View File

@@ -4,7 +4,6 @@
# Pull base image nodejs image.
FROM node:21.6-alpine3.18
USER root
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global

View File

@@ -1,6 +1,5 @@
FROM nginx:1.25.3-alpine
USER root
ARG GIT_SHA
ARG APP_VERSION

View File

@@ -4,7 +4,6 @@
# Pull base image nodejs image.
FROM node:21.6-alpine3.18
USER root
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global

View File

@@ -4,7 +4,6 @@
# Pull base image nodejs image.
FROM node:21.6-alpine3.18
USER root
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global

View File

@@ -4,7 +4,6 @@
# Pull base image nodejs image.
FROM node:21.6-alpine3.18
USER root
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global

View File

@@ -1,5 +1,4 @@
FROM node:21.6-alpine3.18
USER root
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
# Install bash.