Skip to content

Instantly share code, notes, and snippets.

@isicju
Created October 23, 2024 06:58
Show Gist options
  • Select an option

  • Save isicju/30b3452e90d1e023de3a0b35fee66e82 to your computer and use it in GitHub Desktop.

Select an option

Save isicju/30b3452e90d1e023de3a0b35fee66e82 to your computer and use it in GitHub Desktop.
FROM ubuntu:latest
# Install necessary packages including OpenJDK 8 and wget for downloading the gist
RUN apt-get update && apt-get install -y openjdk-8-jdk
RUN apt-get install wget
RUN apt-get clean
# Create an application directory
WORKDIR /app
# Download the Java source code from the gist
RUN wget https://gist.githubusercontent.com/isicju/ead8e7b1d7737e86d692e8d2da45a9cf/raw/UuidHttpServer.java
# Compile the Java code
RUN javac UuidHttpServer.java
# Expose the necessary port
EXPOSE 8000
# Command to run the compiled Java application
CMD ["java", "UuidHttpServer"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment