-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
57 lines (44 loc) · 1.47 KB
/
Dockerfile
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# syntax=docker/dockerfile:1
FROM alpine:3.15
# Prepare the environment
RUN apk add maven
# Build the jar files
WORKDIR /home/user
COPY local-maven-repo ./local-maven-repo
COPY src ./src
COPY pom.xml .
RUN mvn package || exit
FROM alpine:3.15
# Create a user
RUN adduser --disabled-password --home /home/user --gecos '' user
RUN apk add --no-cache --upgrade bash
RUN apk add --update openjdk17 unzip
RUN apk add --no-cache msttcorefonts-installer fontconfig
RUN update-ms-fonts
RUN apk add --no-cache tesseract-ocr python3 py3-pip py3-numpy && \
pip3 install --upgrade pip setuptools wheel && \
apk add --no-cache --virtual .build-deps gcc g++ zlib-dev make python3-dev py3-numpy-dev jpeg-dev && \
pip3 install matplotlib && \
apk del .build-deps
# Copy all relevant files
WORKDIR /home/user
RUN mkdir -p ./experimental_subjects/argouml
COPY --from=0 /home/user/target ./target
COPY experimental_subjects/* ./experimental_subjects/
COPY experimental_subjects/argouml/* ./experimental_subjects/argouml/
# Unpack the experimental subjects
WORKDIR experimental_subjects
RUN unzip -o ./\*.zip
RUN mv argouml_p*.csv argouml/
# Copy the docker resources
WORKDIR /home/user
COPY docker-resources/* ./
COPY result_analysis_python ./result_analysis_python
# Adjust permissions
RUN chown user:user /home/user -R
RUN chmod +x run-experiments.sh
RUN chmod +x entrypoint.sh
RUN ls -l
RUN ls -l experimental_subjects
ENTRYPOINT ["./entrypoint.sh", "./run-experiments.sh"]
USER user