generated from kachick/anylang-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathContainerfile
26 lines (20 loc) · 1005 Bytes
/
Containerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
FROM ubuntu:24.04@sha256:80dd3c3b9c6cecb9f1667e9290b3bc61b78c2678c02cbdae5f0fea92cc6734ab
LABEL org.opencontainers.image.source=https://github.com/kachick/containers
LABEL org.opencontainers.image.description="Nix package manager on Ubuntu - systemd"
LABEL org.opencontainers.image.licenses=MIT
# Available versions in apt: https://packages.ubuntu.com/noble/curl
# --no-install-recommends omits ca-certificates
RUN apt-get update \
&& apt-get install --no-install-recommends -y curl=8.5.0-2ubuntu10.5 ca-certificates=20240203 \
systemd=255.4-1ubuntu8.4 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
ENV PATH="${PATH}:/nix/var/nix/profiles/default/bin"
RUN curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install linux \
--extra-conf "sandbox = false" \
--no-start-daemon \
--no-confirm
# TODO: Consider to extract from this repository
ARG username="user"
RUN useradd --no-log-init --create-home $username
CMD [ "/bin/systemd", "--system" ]