forked from zakariamaaraki/RemoteCodeCompiler
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (21 loc) · 745 Bytes
/
Dockerfile
File metadata and controls
33 lines (21 loc) · 745 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Build stage
FROM maven AS BUILD_STAGE
WORKDIR /compiler
COPY . .
RUN ["mvn", "clean", "install", "-DskipTests"]
# Run stage
FROM openjdk:11.0.6-jre-slim
WORKDIR /compiler
USER root
COPY --from=BUILD_STAGE /compiler/target/*.jar compiler.jar
RUN apt update && apt install -y docker.io
ADD utility utility
ADD utility_c utility_c
ADD utility_cpp utility_cpp
ADD utility_py utility_py
ADD entrypoint.sh entrypoint.sh
RUN chmod a+x ./entrypoint.sh
EXPOSE 8082
ENTRYPOINT ["./entrypoint.sh"]
# Build image by typing the following command : "docker image build . -t compilertest"
# Run the container by typing the following command : "docker container run -p 8080:8082 -v /var/run/docker.sock:/var/run/docker.sock -t compilertest"