From 06778db998f0c8594075566a6c6db8a6b53f263a Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Wed, 12 Oct 2022 18:01:05 +0100 Subject: [PATCH] Docker --- Dockerfile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0bcfaa2..e76a060 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,7 @@ FROM alpine:latest LABEL maintainer "Alicia Sykes " LABEL org.opencontainers.image.source https://github.com/lissy93/dotfiles +# Parameters ARG user=alicia ARG group=wheel ARG uid=1000 @@ -11,8 +12,8 @@ ARG userspace=userspace.git ARG vcsprovider=github.com ARG vcsowner=lissy93 +# Install system packages, with root USER root - RUN \ echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories && \ apk upgrade --no-cache && \ @@ -54,12 +55,19 @@ RUN \ chown -R ${user}:${group} /home/${user}/.dotfiles && \ chown -R ${user}:${group} /home/${user}/.userspace +ENV DOTFILES_DIR="$HOME/.dotfiles" + RUN chmod u+x /home/${user}/.dotfiles/install.sh USER ${user} -RUN cd $HOME/.dotfiles && ./install.sh +RUN cd $HOME/.dotfiles && ./install.sh --auto-yes ENV HISTFILE=/home/${user}/.cache/.zsh_history CMD [] + +ENTRYPOINT [ "/bin/zsh" ] + +# docker run -it --rm -w "$HOME" -v "$HOME/.userspace":/userspace -v $PWD:/cwd -v $HOME/.config:/config:rw -v /var/run/docker.sock:/var/run/docker.sock --network host dot-test +