2023-12-19 16:38:14 +00:00
|
|
|
FROM ubuntu:22.04
|
2020-10-19 23:10:23 +00:00
|
|
|
|
2021-04-06 20:15:00 +00:00
|
|
|
SHELL ["/bin/bash", "-c"]
|
|
|
|
|
2022-05-04 18:23:17 +00:00
|
|
|
# Install the Docker apt repository
|
|
|
|
RUN apt-get update && \
|
2023-02-15 03:37:32 +00:00
|
|
|
DEBIAN_FRONTEND="noninteractive" apt-get upgrade --yes && \
|
2022-05-04 18:23:17 +00:00
|
|
|
DEBIAN_FRONTEND="noninteractive" apt-get install --yes ca-certificates
|
|
|
|
COPY docker-archive-keyring.gpg /usr/share/keyrings/docker-archive-keyring.gpg
|
|
|
|
COPY docker.list /etc/apt/sources.list.d/docker.list
|
|
|
|
|
2020-10-19 23:10:23 +00:00
|
|
|
# Install baseline packages
|
2021-02-18 19:46:22 +00:00
|
|
|
RUN apt-get update && \
|
2021-04-06 20:15:00 +00:00
|
|
|
DEBIAN_FRONTEND="noninteractive" apt-get install --yes \
|
2021-02-18 19:46:22 +00:00
|
|
|
bash \
|
|
|
|
build-essential \
|
|
|
|
ca-certificates \
|
2023-02-08 09:27:17 +00:00
|
|
|
containerd.io \
|
2021-02-18 19:46:22 +00:00
|
|
|
curl \
|
2022-05-04 18:23:17 +00:00
|
|
|
docker-ce \
|
|
|
|
docker-ce-cli \
|
2024-01-16 12:39:23 +00:00
|
|
|
docker-buildx-plugin \
|
2022-05-04 18:23:17 +00:00
|
|
|
docker-compose-plugin \
|
2021-02-18 19:46:22 +00:00
|
|
|
htop \
|
|
|
|
locales \
|
|
|
|
man \
|
|
|
|
python3 \
|
|
|
|
python3-pip \
|
|
|
|
software-properties-common \
|
|
|
|
sudo \
|
|
|
|
systemd \
|
|
|
|
systemd-sysv \
|
|
|
|
unzip \
|
|
|
|
vim \
|
2023-02-02 04:24:51 +00:00
|
|
|
wget \
|
|
|
|
rsync && \
|
2021-02-18 19:46:22 +00:00
|
|
|
# Install latest Git using their official PPA
|
|
|
|
add-apt-repository ppa:git-core/ppa && \
|
2021-04-06 20:15:00 +00:00
|
|
|
DEBIAN_FRONTEND="noninteractive" apt-get install --yes git
|
2020-10-19 23:10:23 +00:00
|
|
|
|
2020-12-16 18:20:27 +00:00
|
|
|
# Enables Docker starting with systemd
|
|
|
|
RUN systemctl enable docker
|
|
|
|
|
2021-09-15 13:05:31 +00:00
|
|
|
# Add docker-compose
|
2023-02-14 16:51:15 +00:00
|
|
|
RUN curl -L "https://github.com/docker/compose/releases/download/v2.16.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
|
2021-09-15 13:05:31 +00:00
|
|
|
RUN chmod +x /usr/local/bin/docker-compose
|
|
|
|
|
2022-11-18 21:43:22 +00:00
|
|
|
# Make typing unicode characters in the terminal work.
|
|
|
|
ENV LANG en_US.UTF-8
|
|
|
|
|
2020-10-19 23:10:23 +00:00
|
|
|
# Add a user `coder` so that you're not developing as the `root` user
|
2021-04-06 20:15:00 +00:00
|
|
|
RUN useradd coder \
|
|
|
|
--create-home \
|
|
|
|
--shell=/bin/bash \
|
|
|
|
--groups=docker \
|
|
|
|
--uid=1000 \
|
|
|
|
--user-group && \
|
|
|
|
echo "coder ALL=(ALL) NOPASSWD:ALL" >>/etc/sudoers.d/nopasswd
|
2020-12-16 23:00:01 +00:00
|
|
|
|
2022-02-16 23:35:18 +00:00
|
|
|
USER coder
|