You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm wondering if it would be helpful to use a smaller base image. Which OS you choose as a base to your Dockerfile can affect how long it takes to pull an image on a fresh machine. Using Debian instead of Ubuntu would save over 100MB. When I use dockerfile/java or any of the other images, there's really no benefit to having the larger Ubuntu instead of Debian even though I use Ubuntu for most of my day-to-day work.
The text was updated successfully, but these errors were encountered:
# Use a smaller base image like Debian
FROM debian:buster
# Set the environment variables to configure the locale
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
# Install Java runtime and other dependencies
RUN apt-get update && apt-get install -y openjdk-11-jre-headless
# Copy your application JAR or files into the container
COPY your-app.jar /app/
# Specify the working directory
WORKDIR /app
# Specify the command to run your Java application
CMD ["java", "-jar", "your-app.jar"]
I'm wondering if it would be helpful to use a smaller base image. Which OS you choose as a base to your Dockerfile can affect how long it takes to pull an image on a fresh machine. Using Debian instead of Ubuntu would save over 100MB. When I use dockerfile/java or any of the other images, there's really no benefit to having the larger Ubuntu instead of Debian even though I use Ubuntu for most of my day-to-day work.
The text was updated successfully, but these errors were encountered: