use Docker cache mount for apk
This commit is contained in:
		@@ -10,11 +10,10 @@ ENV RACK_ENV="production" \
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
WORKDIR /kubernaut
 | 
					WORKDIR /kubernaut
 | 
				
			||||||
 | 
					
 | 
				
			||||||
RUN <<EOT
 | 
					RUN \
 | 
				
			||||||
  apk update -q
 | 
					  --mount=type=cache,id=var-cache-apk,target=/var/cache/apk,sharing=locked \
 | 
				
			||||||
 | 
					  apk update -q; \
 | 
				
			||||||
  apk add bash jemalloc
 | 
					  apk add bash jemalloc
 | 
				
			||||||
  rm -rf /var/cache/apk
 | 
					 | 
				
			||||||
EOT
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
RUN \
 | 
					RUN \
 | 
				
			||||||
  --mount=type=cache,id=usr-local-bundle-cache,target=${BUNDLE_PATH},sharing=locked \
 | 
					  --mount=type=cache,id=usr-local-bundle-cache,target=${BUNDLE_PATH},sharing=locked \
 | 
				
			||||||
@@ -23,10 +22,11 @@ RUN \
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
FROM base AS build
 | 
					FROM base AS build
 | 
				
			||||||
 | 
					
 | 
				
			||||||
RUN <<EOT
 | 
					RUN \
 | 
				
			||||||
  apk add musl-dev gcc make
 | 
					  --mount=type=cache,id=var-cache-apk,target=/var/cache/apk,sharing=locked \
 | 
				
			||||||
  rm -rf /var/cache/apk
 | 
					  apk update -q; \
 | 
				
			||||||
EOT
 | 
					  apk add musl-dev gcc make; \
 | 
				
			||||||
 | 
					  apk add bash jemalloc
 | 
				
			||||||
 | 
					
 | 
				
			||||||
COPY Gemfile Gemfile.lock ./
 | 
					COPY Gemfile Gemfile.lock ./
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user