add archlinux version with teleport installed
This commit is contained in:
+14
-8
@@ -1,4 +1,4 @@
|
||||
FROM alpine:edge
|
||||
FROM archlinux:latest
|
||||
|
||||
ENV USER=borg
|
||||
ENV UID=1000
|
||||
@@ -15,22 +15,29 @@ VOLUME ["/backups"]
|
||||
VOLUME ["/logs"]
|
||||
VOLUME ["/sshkeys/host"]
|
||||
|
||||
COPY motd.txt /etc/motd
|
||||
COPY entrypoint-script/entrypoint.sh /
|
||||
COPY entrypoint-script/variables.sh /
|
||||
COPY scripts/borgbackup.sh /usr/local/bin/
|
||||
|
||||
COPY bash-config/.bash_profile /root/
|
||||
COPY bash-config/.bashrc /root/
|
||||
COPY bash-config/.bashrc_root /root/
|
||||
|
||||
COPY bash-config/.bash_profile /
|
||||
COPY bash-config/.bashrc /
|
||||
|
||||
COPY prometheus-borg-exporter/borg_exporter.sh /usr/local/bin/
|
||||
COPY prometheus-borg-exporter/borg_exporter.rc /etc/
|
||||
|
||||
# Install packages
|
||||
RUN apk update ; apk upgrade
|
||||
RUN apk add --no-cache sudo bash bash-completion tzdata openssh openrc neofetch \
|
||||
borgbackup dateutils prometheus-node-exporter curl wget
|
||||
RUN rm -rf /var/cache/apk/*
|
||||
RUN pacman -Syu --noconfirm sudo bash-completion openssh neofetch \
|
||||
borgbackup dateutils prometheus-node-exporter wget git base-devel cron net-tools inetutils
|
||||
|
||||
# Make Build User
|
||||
RUN useradd builduser -m
|
||||
RUN passwd -d builduser
|
||||
RUN printf 'builduser ALL=(ALL) ALL\n' | tee -a /etc/sudoers
|
||||
RUN sudo -u builduser bash -c 'cd ~ && git clone https://aur.archlinux.org/teleport-bin.git teleport && cd teleport && makepkg -si --noconfirm && cd ~ && rm -rf teleport'
|
||||
RUN userdel -r builduser
|
||||
|
||||
# Setup SSH-Server
|
||||
RUN sed -ie 's/#Port 22/Port 22/g' /etc/ssh/sshd_config
|
||||
@@ -40,7 +47,6 @@ RUN sed -ie 's/#PasswordAuthentication yes/PasswordAuthentication no/g' /etc/ssh
|
||||
RUN sed -ie 's|#HostKey /etc/ssh/ssh_host_rsa_key|HostKey /sshkeys/host/ssh_host_rsa_key|g' /etc/ssh/sshd_config
|
||||
RUN sed -ie 's|#HostKey /etc/ssh/ssh_host_ecdsa_key|HostKey /sshkeys/host/ssh_host_ecdsa_key|g' /etc/ssh/sshd_config
|
||||
RUN sed -ie 's|#HostKey /etc/ssh/ssh_host_ed25519_key|HostKey /sshkeys/host/ssh_host_ed25519_key|g' /etc/ssh/sshd_config
|
||||
RUN sed -ie 's|root:x:0:0:root:/root:/bin/ash|root:x:0:0:root:/root:/bin/bash|g' /etc/passwd
|
||||
|
||||
EXPOSE 22
|
||||
ENTRYPOINT [ "/entrypoint.sh" ]
|
||||
|
||||
Reference in New Issue
Block a user