OILS / deps / Dockerfile.soil-debian-12 View on Github | oilshell.org

33 lines, 25 significant
1FROM debian:bookworm-slim
2
3WORKDIR /home/uke/tmp
4
5# Copy build scripts into the container and run them
6COPY deps/from-apt.sh /home/uke/tmp/deps/from-apt.sh
7
8RUN deps/from-apt.sh init-deb-cache
9
10# --no-cache will make these invisible
11# And it appears that id= makes them stable across Dockerfile.{common,pea} ?
12# So we have a single shared cache.
13RUN --mount=type=cache,id=var-cache-apt-debian-12,target=/var/cache/apt,sharing=locked \
14 --mount=type=cache,id=var-lib-apt-debian-12,target=/var/lib/apt,sharing=locked \
15 du --si -s /var/cache/apt /var/lib/apt && \
16 deps/from-apt.sh layer-debian-12
17
18# Note: can't remove apt lists yet, because other images will install more
19# packages.
20RUN useradd --create-home uke && chown -R uke /home/uke
21
22# TODO: try making this a relative wedge:
23# - It's installed in /home/wedge-builder/wedge/...
24# - It's RUN from /home/uke/wedge/...
25
26COPY --chown=uke \
27 _build/wedge/binary/oils-for-unix.org/pkg/time-helper/2023-02-28 \
28 /wedge/oils-for-unix.org/pkg/time-helper/2023-02-28
29
30# We always need Python 2
31COPY --chown=uke \
32 _build/wedge/binary/oils-for-unix.org/pkg/python2/2.7.18 \
33 /wedge/oils-for-unix.org/pkg/python2/2.7.18