I have a series of docker services that uses the same base Dockerfile, e.g.:
services:
service_1:
build:
context: .
...
service_2:
build:
context: .
...
On Dockerfile
, I run a few installations:
FROM base_image
RUN apk add --no-cache \
g++ \
git \
...
How do I make sure that build for Dockerfile
takes place only once? That is, after the Dockerfile
build for service_1
, the service_2
uses a cached result?