@@ -35,26 +35,20 @@ COPY pom.xml .
3535# EXAMPLE: Execute the maven package process
3636RUN mvn package || exit
3737
38- FROM ubuntu:latest
39- # ENVIRONMENT PREPARATION PHASE
40- # We have to use an Ubuntu image, because Haskell and Stack are not natively supported by Alpine Linux
41-
42- # REQUIRED: Create a user
43- RUN adduser --disabled-password --home /home/sherlock --gecos '' sherlock
44-
45- # Install Haskell and Stack
46- RUN DEBIAN_FRONTEND="noninteractive" apt-get update -qy &&\
47- DEBIAN_FRONTEND="noninteractive" apt-get install netbase haskell-platform haskell-stack git-all -qy
48- RUN stack update
49- RUN stack upgrade
38+ FROM alpine:3.15
5039
51- # Install Java
52- RUN DEBIAN_FRONTEND= "noninteractive" apt-get install openjdk-16-jdk-headless -qy
40+ # Create a user
41+ RUN adduser --disabled-password --home /home/sherlock --gecos '' sherlock
5342
54- # Install Python
55- RUN DEBIAN_FRONTEND="noninteractive" apt-get install tesseract-ocr python3 python3-pip python3-numpy -qy
56- RUN pip3 install --upgrade pip setuptools wheel
57- RUN pip3 install matplotlib
43+ RUN apk add --no-cache --upgrade bash
44+ RUN apk add --update openjdk17
45+ RUN apk add --no-cache msttcorefonts-installer fontconfig
46+ RUN update-ms-fonts
47+ RUN apk add --no-cache tesseract-ocr python3 py3-pip py3-numpy && \
48+ pip3 install --upgrade pip setuptools wheel && \
49+ apk add --no-cache --virtual .build-deps gcc g++ zlib-dev make python3-dev py3-numpy-dev jpeg-dev && \
50+ pip3 install matplotlib && \
51+ apk del .build-deps
5852
5953# REQUIRED: Change into the home directory
6054WORKDIR /home/sherlock
@@ -65,27 +59,17 @@ WORKDIR /home/sherlock/holmes
6559COPY --from=0 /home/user/target/DiffDetectiveRunner.jar .
6660WORKDIR /home/sherlock
6761
68- # Copy the haskell files
69- COPY proofs proofs
70-
7162# Copy the setup
7263COPY docs holmes/docs
7364
7465# Copy the plotting scripts
7566COPY plotting holmes/plotting
7667
77- # Build the Haskell project
78- # # Enable printing utf-8
79- ENV LANG=C.UTF-8
80- WORKDIR /home/sherlock/proofs
81- RUN stack build --copy-bins
82- ENV PATH=="/root/.local/bin:${PATH}"
83-
84- WORKDIR /home/sherlock
85- # REQUIRED: Copy the docker resources
68+ # Copy the docker resources
8669COPY docker/* ./
8770RUN mkdir DiffDetectiveMining
88- # REQUIRED: Adjust permissions
71+
72+ # Adjust permissions
8973RUN chown sherlock:sherlock /home/sherlock -R
9074RUN chmod +x execute.sh
9175RUN chmod +x entrypoint.sh
0 commit comments