diff --git a/Dockerfile b/Dockerfile index e25ae6970823ffcc1af28c45620429c520cbda5d..586ee6f0300535e84f00098951d7efe0372ccc80 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,33 +1,27 @@ -### 1. Get Linux +### 1. Get Docker image with jdk11 FROM eclipse-temurin:11-alpine -### 2. Get Java via the package manager -# RUN apk update -#&& apt upgrade \ -#&& apt add --no-cache bash \ -#&& apt add --no-cache --virtual=build-dependencies unzip \ -#&& apt add --no-cache curl \ -# RUN apk add --no-cache openjdk11 - -### 3. Get Python, PIP +### 2. Get Python, PIP ENV PYTHONUNBUFFERED=1 RUN apk add --update --no-cache python3 && ln -sf python3 /usr/bin/python RUN python3 -m ensurepip RUN pip3 install --no-cache --upgrade pip setuptools -RUN mkdir /home/soil-backend +# 3. Copy the python dependencies definition and install it +RUN mkdir /home/soil-backend WORKDIR /home/soil-backend - COPY ./requirements.txt . - RUN pip3 install -r requirements.txt +# 4. Copy all required source files and resources (i.e., the jar-build of the Monticore based SOIL tool) + COPY ./src ./src COPY ./resources ./resources - WORKDIR ./src +# 5. Start the FastAPI server + CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"] diff --git a/resources/soil.jar b/resources/soil.jar index 4d8a73f7043074546d9febbaed46f49d5722615a..3174ccc8cce48b9b588c6149ff589fc759b948e5 100644 Binary files a/resources/soil.jar and b/resources/soil.jar differ