aboutsummaryrefslogtreecommitdiff
path: root/.config/lxc/builds/alpine3.15.dockerfile
diff options
context:
space:
mode:
Diffstat (limited to '.config/lxc/builds/alpine3.15.dockerfile')
-rw-r--r--.config/lxc/builds/alpine3.15.dockerfile20
1 files changed, 20 insertions, 0 deletions
diff --git a/.config/lxc/builds/alpine3.15.dockerfile b/.config/lxc/builds/alpine3.15.dockerfile
new file mode 100644
index 0000000..bcdf390
--- /dev/null
+++ b/.config/lxc/builds/alpine3.15.dockerfile
@@ -0,0 +1,20 @@
+FROM docker.io/library/alpine:3.15@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3
+
+RUN apk update
+
+RUN apk add openrc neofetch xauth openssh vim htop
+
+RUN rc-update add networking
+RUN rc-update add sshd
+
+RUN printf 'auto lo\niface lo inet loopback\n\nauto eth0\niface eth0 inet dhcp\n' > /etc/network/interfaces
+
+RUN printf 'export TERM=xterm-256color\n' >> /etc/profile
+RUN printf 'id -u user > /dev/null 2>&1 || { adduser -u 1000 -g user user -D; }\n' >> /etc/profile
+
+RUN printf '. /etc/profile && neofetch\n' > /etc/profile.d/neofetch
+
+RUN printf "export ENV='/etc/profile.d/neofetch'\n" >> /etc/profile
+
+RUN printf '{ [ "$(whoami)" = "root" ] && export PS1='\''(alpine) \[\\e[0;31m\]\w\[\\e[0m\] \[\\e[0;31m\]\$\[\\e[0m\] '\''; } || true\n' >> /etc/profile
+RUN printf '{ [ "$(whoami)" = "user" ] && export PS1='\''(alpine) \[\\e[0;32m\]\w\[\\e[0m\] \[\\e[0;32m\]\$\[\\e[0m\] '\''; } || true\n' >> /etc/profile