2024-11-11 10:07:06 +00:00
|
|
|
FROM ubuntu:24.04
|
2018-10-03 01:14:21 +00:00
|
|
|
|
2024-11-11 10:07:06 +00:00
|
|
|
ARG docker_version="27.3.1"
|
2020-08-12 05:33:24 +00:00
|
|
|
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
2018-10-03 01:14:21 +00:00
|
|
|
RUN apt-get update \
|
2022-07-28 06:49:19 +00:00
|
|
|
&& apt-get install -y ca-certificates curl gnupg lsb-release \
|
|
|
|
&& 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" "$(lsb_release -cs) stable" \
|
|
|
|
| tee /etc/apt/sources.list.d/docker.list > /dev/null \
|
2018-10-03 01:14:21 +00:00
|
|
|
&& apt-get update \
|
2020-08-12 05:33:24 +00:00
|
|
|
&& apt-get install -y --no-install-recommends locales ufw \
|
2024-11-11 10:07:06 +00:00
|
|
|
&& apt-get install -y --no-install-recommends "docker-ce=$(apt-cache madison docker-ce | grep -m1 -F "${docker_version}" | cut -d'|' -f2 | tr -d '[[:blank:]]')" \
|
2020-08-12 05:33:24 +00:00
|
|
|
&& locale-gen en_US.UTF-8 \
|
2018-10-03 01:14:21 +00:00
|
|
|
&& apt-get clean autoclean \
|
|
|
|
&& apt-get autoremove --yes \
|
|
|
|
&& rm -rf /var/lib/{apt,dpkg,cache,log}/
|
|
|
|
|
|
|
|
ADD ufw-docker docker-entrypoint.sh /usr/bin/
|
|
|
|
|
|
|
|
ENTRYPOINT ["/usr/bin/docker-entrypoint.sh"]
|
|
|
|
|
|
|
|
CMD ["start"]
|
2018-12-01 23:54:04 +00:00
|
|
|
|
|
|
|
ADD LICENSE README.md /
|