Last active
December 26, 2024 00:28
-
-
Save thanoojgithub/2555e499201a9b8461686f38e374a7b3 to your computer and use it in GitHub Desktop.
Dockerfile - Ubuntu with basic Java configurations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use Ubuntu as base image | |
FROM ubuntu:25.04 | |
# Set non-interactive frontend for apt | |
ENV DEBIAN_FRONTEND=noninteractive | |
# Install prerequisites | |
RUN apt update && apt upgrade -y && apt install -y \ | |
wget \ | |
curl \ | |
git \ | |
build-essential \ | |
software-properties-common \ | |
unzip \ | |
vim \ | |
neovim \ | |
openjdk-21-jdk | |
# Install Gradle 8.11.1 | |
RUN wget https://services.gradle.org/distributions/gradle-8.11.1-bin.zip -P /tmp && \ | |
unzip /tmp/gradle-8.11.1-bin.zip -d /opt/ && \ | |
ln -s /opt/gradle-8.11.1/bin/gradle /usr/bin/gradle | |
# Verify installations | |
RUN java -version && \ | |
gradle -v && \ | |
git -v && \ | |
curl --version && \ | |
wget --version && \ | |
nvim --version | |
# Default work directory | |
WORKDIR /workspace | |
# Set container's entry point | |
CMD ["/bin/bash"] |
Author
thanoojgithub
commented
Dec 26, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment