Browse Source

Optimize Dockerfile

Optimize Dockerfile, reduce build time.
closed-social-glitch-2
Ryan Wade 7 years ago
parent
commit
a2637c1720
2 changed files with 4 additions and 1 deletions
  1. +1
    -0
      .dockerignore
  2. +3
    -1
      Dockerfile

+ 1
- 0
.dockerignore View File

@ -5,3 +5,4 @@ public/assets
node_modules
storybook
neo4j
vendor/bundle

+ 3
- 1
Dockerfile View File

@ -5,7 +5,7 @@ ENV RAILS_ENV=production \
WORKDIR /mastodon
COPY . /mastodon
COPY Gemfile Gemfile.lock package.json yarn.lock /mastodon/
RUN BUILD_DEPS=" \
postgresql-dev \
@ -28,4 +28,6 @@ RUN BUILD_DEPS=" \
&& apk del $BUILD_DEPS \
&& rm -rf /tmp/* /var/cache/apk/*
COPY . /mastodon
VOLUME /mastodon/public/system /mastodon/public/assets

Loading…
Cancel
Save