1 | # For buildings wedges. Similar to Dockerfile.common
|
2 | #
|
3 | # TODO: Separate by distro
|
4 | #
|
5 | # Dockerfile.wedge-alpine-3.0
|
6 | # Dockerfile.wedge-debian-bullseye
|
7 | # Dockerfile.wedge-ubuntu-18.04
|
8 | # Dockerfile.wedge-ubuntu-20.04
|
9 |
|
10 | # TODO: use bullseye?
|
11 | FROM debian:buster-slim
|
12 |
|
13 | WORKDIR /home/wedge-builder/tmp
|
14 |
|
15 | # Copy again to prevent unsound caching
|
16 | COPY deps/from-apt.sh /home/wedge-builder/tmp/deps/from-apt.sh
|
17 |
|
18 | RUN deps/from-apt.sh init-deb-cache
|
19 |
|
20 | # Note we do apt-get update here too
|
21 | RUN --mount=type=cache,id=var-cache-apt,target=/var/cache/apt,sharing=locked \
|
22 | --mount=type=cache,id=var-lib-apt,target=/var/lib/apt,sharing=locked \
|
23 | du --si -s /var/cache/apt /var/lib/apt && \
|
24 | deps/from-apt.sh layer-wedge-builder
|
25 |
|
26 | # Password-less sudo for 'sudo make install'
|
27 | RUN useradd --create-home -G sudo wedge-builder && \
|
28 | echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && \
|
29 | chown -R wedge-builder /home/wedge-builder
|
30 |
|
31 | USER wedge-builder
|
32 |
|
33 | CMD ["sh", "-c", "echo 'hello from oilshell/soil-wedge-builder'"]
|