-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (23 loc) · 795 Bytes
/
Dockerfile
File metadata and controls
30 lines (23 loc) · 795 Bytes
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
27
28
29
30
FROM ubuntu:20.04
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && \
apt-get install -y --no-install-recommends \
sudo \
curl \
make \
git \
build-essential \
lsb-release \
ca-certificates
RUN sh -c "$(curl -fsLS get.chezmoi.io)" -- -b /usr/local/bin
ARG HOST_UID=1001
ARG HOST_GID=1001
RUN (groupadd -g ${HOST_GID} dot || true) && \
useradd --create-home --no-log-init -s /bin/bash -u ${HOST_UID} -g ${HOST_GID} dot && \
echo "dot ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
USER dot
RUN mkdir -p /home/dot/.local/share/chezmoi
COPY --chown=dot:dot ./ /home/dot/.local/share/chezmoi/
WORKDIR /home/dot/.local/share/chezmoi
CMD ["/bin/bash"]