Skip to content

Commit

Permalink
run java in dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
David Kauschke committed Oct 27, 2023
1 parent 019a577 commit aa1d66c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
16 changes: 8 additions & 8 deletions Teams/red_titans/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
FROM eclipse-temurin:17-jdk-jammy as build

COPY src/Inception.java /src/
COPY src/inception.png /src/
RUN javac /src/Inception.java && ls -al /src

FROM eclipse-temurin:17-jdk-jammy

COPY --from=build src/*.class /app/
WORKDIR /src

COPY src/Inception.java .
COPY src/inception.png .

ENTRYPOINT cd app && java Inception

#COPY --from=build src/*.class /app/

RUN javac /src/Inception.java
CMD ["java /src/Inception"]
#ENTRYPOINT ["javaXX", "InceptionXX"]
4 changes: 3 additions & 1 deletion Teams/red_titans/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ services:
volumes:
- ./src/:/usr/app/src/
#command: "/usr/app/.venv/bin/python3 /usr/app/src/simple_client.py"
command: "/usr/app/.venv/bin/python3 /usr/app/src/simple_client.py"
#command: "/usr/app/.venv/bin/python3 /usr/app/src/simple_client.py"
#command: "ls -lha /src"
#command: "java Inception"

0 comments on commit aa1d66c

Please sign in to comment.