Skip to content

Commit dc35b64

Browse files
committed
apicula: support overriding the base image
1 parent cf95e54 commit dc35b64

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

debian-buster/apicula.dockerfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
# SPDX-License-Identifier: Apache-2.0
2222

2323
ARG REGISTRY='ghcr.io/hdl/debian-buster'
24+
ARG IMAGE="build:base"
2425

2526
#---
2627

@@ -45,13 +46,17 @@ COPY --from=build /tmp/apicula /apicula
4546

4647
#---
4748

48-
FROM $REGISTRY/build:base
49+
# WORKAROUND: this is required because '--mount=' does not support ARGs
50+
FROM $REGISTRY/pkg:apicula AS pkg-apicula
51+
52+
FROM $REGISTRY/$IMAGE
4953

5054
RUN apt-get update -qq \
5155
&& DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends \
5256
python3-pip \
5357
python3-setuptools \
5458
python3-wheel
5559

56-
RUN --mount=type=cache,from=build,src=/tmp/apicula,target=/tmp/apicula pip3 install -U /tmp/apicula/*.whl --progress-bar off \
60+
RUN --mount=type=cache,from=pkg-apicula,src=/apicula,target=/tmp/apicula/ \
61+
pip3 install -U /tmp/apicula/*.whl --progress-bar off \
5762
&& rm -rf ~/.cache

0 commit comments

Comments
 (0)