diff --git a/Dockerfile b/Dockerfile index 1bd0dea..0031773 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM python:3.12.4-bookworm ENV DEBIAN_FRONTEND=noninteractive # nötig damit die ansible-tools gefunden werden -ENV PATH="$PATH:/home/ansible-user/.local/bin" +ENV PATH="$PATH:/home/ansible-dev/.local/bin" # hadolint ignore=DL3008 @@ -38,18 +38,18 @@ RUN apt-get update \ # https://dev.to/izackv/running-a-docker-container-with-a-custom-non-root-user-syncing-host-and-container-permissions-26mb # hadolint ignore=DL3008 RUN addgroup --gid 2000 nonroot && \ - adduser --uid 2000 --gid 2000 --disabled-password --gecos "" ansible-user && \ - echo 'ansible-user ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers + adduser --uid 2000 --gid 2000 --disabled-password --gecos "" ansible-dev && \ + echo 'ansible-dev ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers # Set the non-root user as the default user -USER ansible-user +USER ansible-dev -WORKDIR /home/ansible-user/ +WORKDIR /home/ansible-dev/ -COPY --chown=ansible-user:ansible-user requirements.txt . -COPY --chown=ansible-user:ansible-user requirements.yaml . -COPY --chown=ansible-user:ansible-user start_tmux.sh . -COPY --chown=ansible-user:ansible-user version.sh . +COPY --chown=ansible-dev:ansible-dev requirements.txt . +COPY --chown=ansible-dev:ansible-dev requirements.yaml . +COPY --chown=ansible-dev:ansible-dev start_tmux.sh . +COPY --chown=ansible-dev:ansible-dev version.sh . # hadolint ignore=DL3013 RUN python3 -m pip install --no-cache-dir --upgrade pip \ @@ -68,8 +68,8 @@ RUN git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.v && rm ~/.bashrc \ && ln -s ~/dotfiles/.bash_extra ~/.bashrc \ && vim +PluginInstall +qall \ - && mkdir /home/ansible-user/ansible-homeserver + && mkdir /home/ansible-dev/ansible-homeserver -ENTRYPOINT ["/home/ansible-user/start_tmux.sh"] +ENTRYPOINT ["/home/ansible-dev/start_tmux.sh"] #mount to non root user?