Skip to content

Commit

Permalink
chore(devcontainer): use coatldev/six:3.12 as base image and install …
Browse files Browse the repository at this point in the history
…jython

coatldev/six will no longer publish an image with Jython pre-installed
  • Loading branch information
cesarcoatl committed Jul 4, 2024
1 parent 6d8724e commit 293a0f2
Showing 1 changed file with 38 additions and 2 deletions.
40 changes: 38 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,40 @@
FROM coatldev/six:jython-3.12 as devcontainer
FROM coatldev/six:3.12 AS base

ENV JYTHON_HOME=/opt/jython

# install Java
# hadolint ignore=DL3008
RUN set -eux; \
apt-get update; \
apt-get install --yes --no-install-recommends \
openjdk-17-jre \
; \
rm -rf /var/lib/apt/lists/*

# >============================================================================<

FROM base AS jython

ENV JYTHON_VERSION=2.7.3

WORKDIR /tmp

RUN set -eux; \
\
wget -q "https://repo1.maven.org/maven2/org/python/jython-installer/${JYTHON_VERSION}/jython-installer-${JYTHON_VERSION}.jar"; \
\
java -jar "jython-installer-${JYTHON_VERSION}.jar" \
--silent \
--type standard \
--directory "${JYTHON_HOME}"

# >============================================================================<

FROM base AS devcontainer

COPY --from=jython ${JYTHON_HOME}/ ${JYTHON_HOME}/

ENV PATH="${JYTHON_HOME}/bin:$PATH"

COPY requirements /tmp/requirements/

Expand All @@ -12,4 +48,4 @@ RUN set -eux; \
python3 -m pip install --requirement \
/tmp/requirements/build.txt

CMD ["/bin/bash"]
CMD ["/bin/bash"]

0 comments on commit 293a0f2

Please sign in to comment.