-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.alpine
More file actions
35 lines (25 loc) · 1003 Bytes
/
Dockerfile.alpine
File metadata and controls
35 lines (25 loc) · 1003 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
31
32
33
34
35
# alpine:3.21.0
FROM alpine@sha256:21dc6063fd678b478f57c0e13f47560d0ea4eeba26dfc947b2a4f81f686b9f45 AS alpine
ARG username=vortex
ARG skipExtras=false
RUN apk update && apk add --update &&\
apk add --update bash curl git sudo zsh &&\
apk add --update gcc linux-headers python3 python3-dev py3-pip &&\
apk add --update go &&\
apk add --update nodejs-current npm &&\
rm -rf /var/cache/apk/*
RUN \
adduser -Ds /bin/zsh "${username}" $username &&\
echo "$username ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/$username &&\
chmod 0440 /etc/sudoers.d/$username &&\
chown -R $username:$username /home/$username &&\
rm -rf /etc/profile.d
USER $username
WORKDIR /home/$username/
RUN curl --proto '=https' --tlsv1.2 -fsLS https://sh.rustup.rs | sh -s -- -y --no-modify-path --profile minimal
ENV PATH="/home/$username/.cargo/bin:${PATH}"
ENV DRY_RUN="$skipExtras"
COPY --chown=$username:$username . .dotfiles
RUN ./.dotfiles/install.sh
ENTRYPOINT ["/bin/zsh"]
CMD ["--login"]