| 1 | FROM debian:bookworm-slim
|
| 2 |
|
| 3 | WORKDIR /home/uke/tmp
|
| 4 |
|
| 5 | # Copy build scripts into the container and run them
|
| 6 | COPY deps/from-apt.sh /home/uke/tmp/deps/from-apt.sh
|
| 7 |
|
| 8 | RUN 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.
|
| 13 | RUN --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.
|
| 20 | RUN useradd --create-home uke && chown -R uke /home/uke
|
| 21 |
|
| 22 | # Need to be unprivileged to create the symlink
|
| 23 | USER uke
|
| 24 |
|
| 25 | # benchmarks/time_.py searches for this
|
| 26 | # The pea image needs it, and maybe more. (To bootstrap Soil as well?)
|
| 27 | COPY --chown=uke \
|
| 28 | _build/boxed/wedge/time-helper/2023-02-28 \
|
| 29 | /home/uke/oils.DEPS/wedge/time-helper/2023-02-28
|
| 30 |
|
| 31 | COPY --chown=uke \
|
| 32 | _build/boxed/wedge/python2/2.7.18 \
|
| 33 | /home/uke/oils.DEPS/wedge/python2/2.7.18
|
| 34 |
|
| 35 | # symlink python2 -> python binary
|
| 36 | RUN mkdir -p /home/uke/oils.DEPS/bin && \
|
| 37 | ln -s --relative /home/uke/oils.DEPS/wedge/python2/2.7.18/bin/python /home/uke/oils.DEPS/bin/python2
|
| 38 |
|
| 39 | # Temporarily switch back to root for images built on top of this
|
| 40 | USER root
|