From df1d0095c30e9bd736eba779b9cda57a188ca097 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dariusz=20J=C4=99drzejczak?= Date: Mon, 1 Mar 2021 19:24:11 +0100 Subject: [PATCH] fix: run docker with root to fix crashing on Linux (undoes 62da387d3a) --- Dockerfile | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index d30d111ecc1..ef383b6685d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,5 @@ FROM ruby:2.7.1-alpine3.12 -ARG UID=1000 -ARG GID=1000 - -RUN addgroup -S webapp -g $GID && adduser -D -S webapp -G webapp -u $UID - RUN apk add --update --no-cache \ alpine-sdk \ nodejs-current \ @@ -16,19 +11,15 @@ RUN apk add --update --no-cache \ WORKDIR /app/ -RUN chown -R $UID:$GID . - -USER webapp - -COPY --chown=$UID:$GID package.json yarn.lock Gemfile Gemfile.lock /app/ +COPY package.json yarn.lock Gemfile Gemfile.lock /app/ -COPY --chown=$UID:$GID vendor /app/vendor +COPY vendor /app/vendor RUN yarn install --pure-lockfile RUN gem install bundler && bundle install -COPY --chown=$UID:$GID . /app/ +COPY . /app/ RUN yarn bundle