fix: run docker with root to fix crashing on Linux (undoes 62da387d3a) (#525)

This commit is contained in:
Darius JJ Chuck
2021-03-02 09:25:58 +01:00
committed by GitHub
parent 1852b5e045
commit 3fa86428ba

View File

@@ -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 .
COPY package.json yarn.lock Gemfile Gemfile.lock /app/
USER webapp
COPY --chown=$UID:$GID 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