Skip to content

Commit

Permalink
added docker to config setup
Browse files Browse the repository at this point in the history
  • Loading branch information
ferdinandkeller committed Oct 22, 2024
1 parent 81daa8e commit a5e0a42
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,22 @@ RUN apt-get update && \
apt-get install -y tar zip curl wget sudo build-essential make git zsh locales


# === DOCKER ===
# install docker
RUN apt-get update && \
apt-get install -y ca-certificates curl && \
install -m 0755 -d /etc/apt/keyrings && \
curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc && \
chmod a+r /etc/apt/keyrings/docker.asc && \
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null && \
apt-get update && \
apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

# add ubuntu to the docker group
RUN sudo usermod -aG docker ubuntu


# === USER ===
# add ubuntu to sudoers & remove password
RUN echo 'ubuntu ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && \
Expand Down Expand Up @@ -72,5 +88,5 @@ RUN sudo apt-get install -y golang-go


# === START ===
# we want to start with a z shell by default
CMD ["/usr/bin/zsh"]
# start docker daemon & open a new shell
CMD ["sh", "-c", "sudo nohup dockerd >/dev/null 2>&1 & /usr/bin/tmux"]

0 comments on commit a5e0a42

Please sign in to comment.