Skip to content

Commit 22e23aa

Browse files
AlexanderSchultheissibbem
authored andcommitted
Removed Haskell setup from Docker container
1 parent 217dc5f commit 22e23aa

5 files changed

Lines changed: 18 additions & 48 deletions

File tree

Dockerfile

Lines changed: 15 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -35,26 +35,20 @@ COPY pom.xml .
3535
# EXAMPLE: Execute the maven package process
3636
RUN 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
6054
WORKDIR /home/sherlock
@@ -65,27 +59,17 @@ WORKDIR /home/sherlock/holmes
6559
COPY --from=0 /home/user/target/DiffDetectiveRunner.jar .
6660
WORKDIR /home/sherlock
6761

68-
# Copy the haskell files
69-
COPY proofs proofs
70-
7162
# Copy the setup
7263
COPY docs holmes/docs
7364

7465
# Copy the plotting scripts
7566
COPY 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
8669
COPY docker/* ./
8770
RUN mkdir DiffDetectiveMining
88-
# REQUIRED: Adjust permissions
71+
72+
# Adjust permissions
8973
RUN chown sherlock:sherlock /home/sherlock -R
9074
RUN chmod +x execute.sh
9175
RUN chmod +x entrypoint.sh

docker/execute.sh

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
#! /bin/bash
22

33
if [ "$1" == '' ]; then
4-
echo "Either fully run DiffDetective as presented in the paper (replication), run the proofs (proofs) or a do quick setup validation (validation)."
4+
echo "Either fully run DiffDetective as presented in the paper (replication) or a do quick setup validation (validation)."
55
echo "-- Examples --"
66
echo "Run replication: './experiment.sh replication'"
7-
echo "Run proofs: './experiment.sh proofs'"
87
echo "Validate the setup: './experiment.sh validation'"
98
exit
109
fi
@@ -25,16 +24,11 @@ if [ "$1" == 'replication' ] || [ "$1" == 'validation' ]; then
2524
python3 plotting/plot.py
2625
cp ./runtime_histogram.png ../results/ || exit
2726
echo "The results are located in the 'results' directory."
28-
elif [ "$1" == 'proofs' ]; then
29-
echo "Running the proofs"
30-
cd proofs || exit
31-
stack run
3227
else
3328
echo "INVALID ARGUMENT: $1"
34-
echo "Either fully run DiffDetective as presented in the paper (replication), run the proofs (proofs) or a do quick setup validation (validation)."
29+
echo "Either fully run DiffDetective as presented in the paper (replication) or a do quick setup validation (validation)."
3530
echo "-- Examples --"
3631
echo "Run replication: './experiment.sh replication'"
37-
echo "Run proofs: './experiment.sh proofs'"
3832
echo "Validate the setup: './experiment.sh validation'"
3933
exit
4034
fi

docs/validation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Project name | Domain | Source code available (**y**es/**n**o)? | Is it a git repository (**y**es/**n**o)? | Repository URL | Clone URL | Estimated number of commits
22
---|-------------------------|-----------------------------------------|-----------------------------------|--------------------------------------------------------------|------------------------------------------------------------------|---
3+
tcl | program interpreter | y | y | https://github.com/tcltk/tcl | https://github.com/tcltk/tcl.git | 24,396
34
xfig | vector graphics editor | y | y | https://github.com/hhoeflin/xfig | https://github.com/hhoeflin/xfig.git | 9
4-
xine-lib | media library | y | y | https://github.com/rpmfusion/xine-lib | https://github.com/rpmfusion/xine-lib.git | 114
55
xorg-server | X server | y | y | https://gitlab.freedesktop.org/xorg/xserver | https://gitlab.freedesktop.org/xorg/xserver.git | 17,786
66
xterm | terminal emulator | y | y | https://github.com/Maximus5/xterm | https://github.com/Maximus5/xterm.git | 112
-4.7 KB
Loading

proofs/INSTALL.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,6 @@ You can then build the library and run the example as follows:
2626
stack run
2727
```
2828

29-
### Option 2: Setup via Dockerfile
30-
31-
#### Building the container
32-
To build the required container, you can follow the instructions provided in the main [INSTALL](../INSTALL.md) file.
33-
Afterwards, you can run the _execute_ script corresponding to your OS with `proofs` as first argument
34-
- Windows: `.\execute.bat proofs`
35-
- Linux/Mac (bash): `./execute.sh proofs`
36-
3729
## What Is There to See
3830

3931
Our example executes a simple test. It:

0 commit comments

Comments
 (0)