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