Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Mar 2, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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 \
Expand All @@ -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

Expand Down