Commit 9ca4852d authored by Eric Duminil's avatar Eric Duminil
Browse files

Simpler dockerfile, downloading SimStadt directly

parent e2ae84ee
...@@ -7,17 +7,23 @@ ARG JRE_URL=https://download.bell-sw.com/java/${JRE_VERSION}/${JRE_DEB} ...@@ -7,17 +7,23 @@ ARG JRE_URL=https://download.bell-sw.com/java/${JRE_VERSION}/${JRE_DEB}
ARG INSEL_VERSION=8.3.4.0b ARG INSEL_VERSION=8.3.4.0b
ARG INSEL_DEB="insel_${INSEL_VERSION}_x64_mini.deb" ARG INSEL_DEB="insel_${INSEL_VERSION}_x64_mini.deb"
ARG INSEL_URL=https://insel.eu/download/${INSEL_DEB} ARG INSEL_URL=https://insel.eu/download/${INSEL_DEB}
ARG SIMSTADT_URL=https://simstadt.hft-stuttgart.de/download/InstallFiles/SimStadt2_latest.zip
# Java 17 + INSEL # Java 17 + INSEL + SimStadt itself.
RUN apt-get update && \ RUN apt-get update && \
apt-get install curl --no-install-recommends -y && \ apt-get install curl unzip --no-install-recommends -y && \
curl ${JRE_URL} -o /tmp/${JRE_DEB} -k && \ curl ${JRE_URL} -o /tmp/${JRE_DEB} -k && \
curl ${INSEL_URL} -o /tmp/${INSEL_DEB} -k && \ curl ${INSEL_URL} -o /tmp/${INSEL_DEB} -k && \
curl ${SIMSTADT_URL} -o /tmp/simstadt.zip -k && \
apt-get install /tmp/${JRE_DEB} /tmp/${INSEL_DEB} --no-install-recommends -y && \ apt-get install /tmp/${JRE_DEB} /tmp/${INSEL_DEB} --no-install-recommends -y && \
apt-get remove curl -y && \ mkdir -p /opt/SimStadt2 && \
unzip -q /tmp/simstadt.zip -d /opt/SimStadt2 && \
apt-get remove curl unzip -y && \
rm -rf /var/lib/apt/lists/* && \ rm -rf /var/lib/apt/lists/* && \
apt-get clean && \ apt-get clean && \
rm /tmp/${JRE_DEB} /tmp/${INSEL_DEB} rm /tmp/${JRE_DEB} /tmp/${INSEL_DEB} /tmp/simstadt.zip
ENV SIMSTADT_FOLDER=/opt/SimStadt2
# SRA # SRA
RUN apt-get update && \ RUN apt-get update && \
...@@ -40,7 +46,7 @@ ENV UV_PROJECT_ENVIRONMENT=/opt/venv ...@@ -40,7 +46,7 @@ ENV UV_PROJECT_ENVIRONMENT=/opt/venv
ENV PATH="/opt/venv/bin:${PATH}" ENV PATH="/opt/venv/bin:${PATH}"
USER simstadt USER simstadt
RUN mkdir -p /home/simstadt/app /home/simstadt/Desktop RUN mkdir -p /home/simstadt/app
WORKDIR /home/simstadt/app WORKDIR /home/simstadt/app
FROM base AS cli FROM base AS cli
...@@ -49,7 +55,6 @@ COPY --chown=simstadt:simstadt pyproject.toml uv.lock README.md ./ ...@@ -49,7 +55,6 @@ COPY --chown=simstadt:simstadt pyproject.toml uv.lock README.md ./
RUN uv sync --frozen --no-install-project RUN uv sync --frozen --no-install-project
RUN uv pip install simstadt RUN uv pip install simstadt
RUN simstadt --install
COPY --chown=simstadt:simstadt tests ./tests COPY --chown=simstadt:simstadt tests ./tests
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment