Created
October 23, 2024 06:58
-
-
Save isicju/30b3452e90d1e023de3a0b35fee66e82 to your computer and use it in GitHub Desktop.
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
| 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