-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
54 lines (51 loc) · 1.8 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
ARG BASE_IMAGE=ubuntu
ARG UBUNTU_VERSION=24.04
FROM ${BASE_IMAGE}:${UBUNTU_VERSION}
ARG TIMEZONE="America/New_York"
ARG DOCKER_VERSION
# =========================================================================
# Install Python and misc utils
# =========================================================================
RUN export DEBIAN_FRONTEND=noninteractive && \
echo "${TIMEZONE}" > /etc/timezone && \
apt-get update && \
apt-get install -yq --no-install-recommends \
apt-utils \
apt-transport-https \
ca-certificates \
curl \
git \
jq \
python3 \
python3-pip \
python3-flake8 \
python3-ipython \
python3-pip \
software-properties-common \
tzdata \
unzip \
wget \
&& \
ln -s /usr/bin/python3 /usr/bin/python && \
rm -rf /var/lib/apt/lists/* && \
unset DEBIAN_FRONTEND
# =========================================================================
# Install Docker client
# =========================================================================
RUN export DEBIAN_FRONTEND=noninteractive && \
mkdir -p /etc/apt/keyrings && \
curl -fsSL "https://download.docker.com/linux/ubuntu/gpg" \
| gpg --dearmor -o "/etc/apt/keyrings/docker.gpg" \
&& \
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" \
> /etc/apt/sources.list.d/docker.list \
&& \
apt-get update && \
apt-get install -yq --no-install-recommends \
docker-ce=${DOCKER_VERSION} \
docker-ce-cli=${DOCKER_VERSION} \
containerd.io \
docker-compose-plugin \
&& \
rm -rf /var/lib/apt/lists/* && \
unset DEBIAN_FRONTEND