Skip to content

Instantly share code, notes, and snippets.

@OndraZizka
Created October 27, 2022 21:37
Show Gist options
  • Save OndraZizka/b11c068d6e9dfc3f4808c80b07e18578 to your computer and use it in GitHub Desktop.
Save OndraZizka/b11c068d6e9dfc3f4808c80b07e18578 to your computer and use it in GitHub Desktop.
Dockerfile: Ubuntu 22.04 + Docker + OpenJDK 18 + Maven 3.8
FROM ubuntu:22.04
ENV qqy="-qq -y -o=Dpkg::Use-Pty=0"
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get $qqy update > /dev/null \
&& apt-get $qqy install ca-certificates curl wget gnupg lsb-release > /dev/null \
&& 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 \
&& apt-get $qqy update > /dev/null \
&& apt-get $qqy install docker-ce docker-ce-cli containerd.io docker-compose-plugin > /dev/null \
&& apt-get $qqy install openjdk-18-jdk-headless > /dev/null \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment