Skip to content

Commit b0bd481

Browse files
Tweak Dockerfile (#6265)
* Don't invalidate cache when Dockerfiles themselves change * Remove grpc sources (frees up 1.7GB)
1 parent edaa039 commit b0bd481

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ storage/
1212
test/
1313
tmp/
1414
vendor/
15+
docker/*.Dockerfile

docker/rails.Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ RUN gem install nokogiri -v 1.14.2 && \
2828
COPY Gemfile Gemfile.lock ./
2929
RUN bundle config set deployment 'true' && \
3030
bundle config set without 'development test' && \
31-
bundle install
31+
bundle install && \
32+
grpc_path="$(bundle show --paths grpc)/src/ruby/ext/grpc" && \
33+
make -C "${grpc_path}" clean && \
34+
rm -rf "${grpc_path}/libs" "${grpc_path}/objs"
3235

3336
# Only package.json and yarn.lock changes require a new yarn install
3437
COPY package.json yarn.lock ./

0 commit comments

Comments
 (0)