소스 검색

Cleanup Dockerfile

Andrew Swistak 6 년 전
부모
커밋
e8c36af426
1개의 변경된 파일3개의 추가작업 그리고 4개의 파일을 삭제
  1. 3 4
      Dockerfile

+ 3 - 4
Dockerfile

@@ -1,12 +1,12 @@
 FROM ruby:2.6.3-alpine AS base
 
 ARG BUILD_PACKAGES="build-base git"
-ARG DEV_PACKAGES="postgresql-dev nodejs yarn"
+ARG DEV_PACKAGES="postgresql-dev yarn"
 ARG RUBY_PACKAGES="tzdata"
 
 # Add git to clone Rspec repositories and build-base to compile nokogiri gem
 # Additionally, we need to set timezone information
-RUN apk add --update --no-cache $BUILD_PACKAGES $DEV_PACKAGES $RUBY_PACKAGES
+RUN apk update && apk add --no-cache $BUILD_PACKAGES $DEV_PACKAGES $RUBY_PACKAGES
 
 # Make an app directory, just like Heroku.
 RUN mkdir /app
@@ -29,7 +29,7 @@ COPY . /app
 
 # And compile our assets, removing unneeded node_modules directory afterwards
 RUN rails assets:precompile && \
-      rm -rf node_modules tmp/cache app/assets vendor/assets spec
+      rm -rf node_modules tmp/cache app/assets log spec
 
 # Copy the docker configurations over
 COPY config/database.yml.docker config/database.yml
@@ -45,7 +45,6 @@ COPY --from=builder /app/ /app/
 
 # Re-add items removed from the builder
 COPY app/assets/ /app/app/assets/
-COPY vendor/assets/ /app/vendor/assets/
 COPY spec/ /app/spec/
 
 # (Re)install the missing development dependencies