-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (32 loc) · 1.28 KB
/
Dockerfile
File metadata and controls
40 lines (32 loc) · 1.28 KB
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
36
37
38
39
FROM archlinux:multilib-devel
LABEL org.opencontainers.image.authors="nooneknowspeter"
LABEL org.opencontainers.image.source="https://github.com/nooneknowspeter/cpplings"
LABEL org.opencontainers.image.title="cpplings"
LABEL org.opencontainers.image.description="A terminal based learning experience for C++, inspired by Rustlings"
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.documentation="https://github.com/nooneknowspeter/cpplings/blob/main/README.md"
# update system and install required packages
RUN pacman -Syyu --needed --noconfirm git curl direnv
# # makepkg user and workdir
# ARG user=someone
# RUN useradd --system --create-home $user \
# && echo "$user ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers.d/$user
# USER $user
# WORKDIR /home/$user
#
# # install yay
# RUN git clone https://aur.archlinux.org/yay.git \
# && cd yay \
# && makepkg -sri --needed --noconfirm \
# && cd \
# # Clean up
# && rm -rf .cache yay
# install nix
RUN sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --daemon --yes
# restart shell
RUN exec bash
# create volume
VOLUME [ "/cpplings" ]
WORKDIR /cpplings
# enable nix experimental features
RUN echo -e "build-users-group = nixbld\nexperimental-features = nix-command flakes" > /etc/nix/nix.conf