-
Notifications
You must be signed in to change notification settings - Fork 57
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
1 parent
b164335
commit bf20f94
Showing
3 changed files
with
53 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -114,11 +114,20 @@ group "base-images" { | |
] | ||
} | ||
|
||
group "package-manager-images" { | ||
targets = [ | ||
"package-manager", | ||
"test-package-manager", | ||
] | ||
} | ||
|
||
### Base Images ### | ||
|
||
target "base" { | ||
labels = { | ||
"maintainer" = "Posit Docker <[email protected]>" | ||
} | ||
} | ||
} | ||
|
||
target "product-base" { | ||
inherits = ["base"] | ||
|
@@ -220,9 +229,11 @@ target "test-product-base-pro" { | |
} | ||
} | ||
|
||
### Package Manager ### | ||
|
||
target "package-manager" { | ||
inherits = ["base"] | ||
inherits = ["product-base-${builds.os}-r${replace(builds.r_primary, ".", "-")}_${replace(builds.r_alternate, ".", "-")}-py${replace(builds.py_primary, ".", "-")}_${replace(builds.py_alternate, ".", "-")}"] | ||
target = "build" | ||
|
||
name = "package-manager-${builds.os}-r${replace(builds.r_primary, ".", "-")}_${replace(builds.r_alternate, ".", "-")}-py${replace(builds.py_primary, ".", "-")}_${replace(builds.py_alternate, ".", "-")}" | ||
tags = [ | ||
|
@@ -246,6 +257,29 @@ target "package-manager" { | |
} | ||
} | ||
|
||
target "test-package-manager" { | ||
inherits = ["package-manager-${builds.os}-r${replace(builds.r_primary, ".", "-")}_${replace(builds.r_alternate, ".", "-")}-py${replace(builds.py_primary, ".", "-")}_${replace(builds.py_alternate, ".", "-")}"] | ||
target = "test" | ||
|
||
name = "package-manager-${builds.os}-r${replace(builds.r_primary, ".", "-")}_${replace(builds.r_alternate, ".", "-")}-py${replace(builds.py_primary, ".", "-")}_${replace(builds.py_alternate, ".", "-")}" | ||
tags = [ | ||
"ghcr.io/rstudio/product-package-manager:${builds.os}-r${builds.r_primary}_${builds.r_alternate}-py${builds.py_primary}_${builds.py_alternate}", | ||
"docker.io/rstudio/product-package-manager:${builds.os}-r${builds.r_primary}_${builds.r_alternate}-py${builds.py_primary}_${builds.py_alternate}", | ||
] | ||
|
||
dockerfile = "Dockerfile.${builds.os}" | ||
context = "package-manager" | ||
|
||
matrix = PACKAGE_MANAGER_BUILD_MATRIX | ||
args = { | ||
R_VERSION = builds.r_primary | ||
R_VERSION_ALT = builds.r_alternate | ||
PYTHON_VERSION = builds.py_primary | ||
PYTHON_VERSION_ALT = builds.py_alternate | ||
RSPM_VERSION = PACKAGE_MANAGER_VERSION | ||
} | ||
} | ||
|
||
target "connect" { | ||
inherits = ["base"] | ||
|
||
|
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ ARG PYTHON_VERSION=3.12.1 | |
ARG PYTHON_VERSION_ALT=3.11.7 | ||
ARG SRC_IMAGE_NAME=product-base | ||
ARG REGISTRY=ghcr.io | ||
FROM ${REGISTRY}/rstudio/${SRC_IMAGE_NAME}:ubuntu2204-r${R_VERSION}_${R_VERSION_ALT}-py${PYTHON_VERSION}_${PYTHON_VERSION_ALT} | ||
FROM ${REGISTRY}/rstudio/${SRC_IMAGE_NAME}:ubuntu2204-r${R_VERSION}_${R_VERSION_ALT}-py${PYTHON_VERSION}_${PYTHON_VERSION_ALT} as build | ||
LABEL maintainer="RStudio Docker <[email protected]>" | ||
|
||
ARG PYTHON_VERSION=3.9.17 | ||
|
@@ -50,3 +50,15 @@ RUN license-manager initialize --userspace || true | |
|
||
ENTRYPOINT ["tini", "--"] | ||
CMD ["/usr/local/bin/startup.sh"] | ||
|
||
FROM build as test | ||
|
||
ARG R_VERSION=4.2.3 | ||
ARG R_VERSION_ALT=4.1.3 | ||
ARG PYTHON_VERSION=3.12.1 | ||
ARG PYTHON_VERSION_ALT=3.11.7 | ||
ARG RSPM_VERSION=2023.12.0-13 | ||
ARG OS=ubuntu2204 | ||
|
||
RUN --mount=type=bind,target=/tmp/test,source=test/ \ | ||
/tmp/test/run_tests.sh |
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