-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
98 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
test/__snapshots__/issues/include-target.expected.dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# See https://codeberg.org/devthefuture/dockerfile-x. | ||
ARG JAVA_VERSION=17 | ||
# Even if no JDK is required for rtx, use an Ubuntu base image that incudes the JDK and which is also used by other | ||
# stages in order to reduce the total number of base images used. | ||
FROM eclipse-temurin:$JAVA_VERSION-jdk-jammy AS build | ||
# See https://docs.docker.com/build/cache/#use-the-dedicated-run-cache | ||
RUN --mount=type=cache,target=/var/cache/apt apt-get update && apt-get install -y --no-install-recommends ca-certificates curl gnupg && install -dm 755 /etc/apt/keyrings && curl https://rtx.jdx.dev/gpg-key.pub | gpg --dearmor > /etc/apt/keyrings/rtx-archive-keyring.gpg && echo "deb [signed-by=/etc/apt/keyrings/rtx-archive-keyring.gpg arch=amd64] https://rtx.jdx.dev/deb stable main" > /etc/apt/sources.list.d/rtx.list && apt-get update && apt-get install -y --no-install-recommends rtx | ||
RUN --mount=type=cache,target=/var/cache/apt apt-get update && apt-get install -y --no-install-recommends build-essential git | ||
# Ease debugging of rtx errors in derived images. | ||
ENV RTX_VERBOSE=1 | ||
# Make the tool versions available to derived images. | ||
COPY .tool-versions . | ||
# DOCKERFILE-X:START file="inc/python.dockerfile" includedBy="issue1.dockerfile" | ||
FROM build AS python-build | ||
RUN --mount=type=cache,target=/var/cache/apt apt-get update && apt-get install -y --no-install-recommends libbz2-dev libffi-dev liblzma-dev libncurses-dev libreadline-dev libssl-dev libz-dev | ||
RUN rtx install python | ||
# DOCKERFILE-X:END file="inc/python.dockerfile" includedBy="issue1.dockerfile" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM build AS python-build | ||
|
||
RUN --mount=type=cache,target=/var/cache/apt \ | ||
# Install tools required for building. | ||
apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
libbz2-dev \ | ||
libffi-dev \ | ||
liblzma-dev \ | ||
libncurses-dev \ | ||
libreadline-dev \ | ||
libssl-dev \ | ||
libz-dev | ||
|
||
RUN rtx install python |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# syntax=devthefuture/dockerfile-x | ||
# See https://codeberg.org/devthefuture/dockerfile-x. | ||
|
||
ARG JAVA_VERSION=17 | ||
|
||
# Even if no JDK is required for rtx, use an Ubuntu base image that incudes the JDK and which is also used by other | ||
# stages in order to reduce the total number of base images used. | ||
FROM eclipse-temurin:$JAVA_VERSION-jdk-jammy AS build | ||
|
||
# See https://docs.docker.com/build/cache/#use-the-dedicated-run-cache | ||
RUN --mount=type=cache,target=/var/cache/apt \ | ||
# Install tools required to install rtx. | ||
apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
ca-certificates \ | ||
curl \ | ||
gnupg \ | ||
&& \ | ||
# Install rtx (see https://github.com/jdx/rtx#installation). | ||
install -dm 755 /etc/apt/keyrings && \ | ||
curl https://rtx.jdx.dev/gpg-key.pub | gpg --dearmor > /etc/apt/keyrings/rtx-archive-keyring.gpg && \ | ||
echo "deb [signed-by=/etc/apt/keyrings/rtx-archive-keyring.gpg arch=amd64] https://rtx.jdx.dev/deb stable main" > /etc/apt/sources.list.d/rtx.list && \ | ||
apt-get update && \ | ||
apt-get install -y --no-install-recommends rtx | ||
|
||
RUN --mount=type=cache,target=/var/cache/apt \ | ||
# Install tools required to run rtx. | ||
apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
build-essential \ | ||
git | ||
|
||
# Ease debugging of rtx errors in derived images. | ||
ENV RTX_VERBOSE=1 | ||
|
||
# Make the tool versions available to derived images. | ||
COPY .tool-versions . | ||
|
||
INCLUDE inc/python.dockerfile |