Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions bakery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ images:
product: "package-manager"
stream: "preview"
os:
- name: Ubuntu 26.04
platforms:
- linux/amd64
- linux/arm64
- name: Ubuntu 24.04
primary: true
platforms:
Expand All @@ -56,6 +60,10 @@ images:
product: "package-manager"
stream: "daily"
os:
- name: Ubuntu 26.04
platforms:
- linux/amd64
- linux/arm64
- name: Ubuntu 24.04
primary: true
platforms:
Expand Down
66 changes: 66 additions & 0 deletions package-manager/template/Containerfile.ubuntu2604.jinja2
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{#-
Below are imports for Bakery's macros. If any are unneeded, they can be removed.
Bakery handles bootstrapping the files into template rendering.
-#}
{%- import "apt.j2" as apt -%}
{%- import "python.j2" as python -%}
{%- import "r.j2" as r -%}

{%- if Image.Variant != "Minimal" -%}
# Build Python using uv in a separate stage
{{ python.build_stage(Dependencies.python) }}

{% endif -%}

FROM docker.io/library/ubuntu:26.04
LABEL org.opencontainers.image.base.name="docker.io/library/ubuntu:26.04"

### ARG declarations ###
ARG TARGETARCH
ARG DEBIAN_FRONTEND=noninteractive
ARG PACKAGE_MANAGER_VERSION="{{ Image.Version }}"

ENV PPM_LICENSE=""
ENV PPM_LICENSE_SERVER=""
ENV PPM_LICENSE_FILE_PATH=""
ENV STARTUP_DEBUG_MODE=0

SHELL ["/bin/bash", "-euo", "pipefail", "-c"]

### Setup environment ###
{{ apt.run_setup(codename="noble") }}

### Install Apt Packages ###
COPY {{ Path.Version }}/deps/ubuntu-26.04_packages.txt /tmp/packages.txt
{{ apt.run_install(files = '/tmp/packages.txt') }}

{% if not Image.Variant == "Minimal" -%}
### Install Python from previous stage ###
{{ python.copy_from_build_stage() }}

### Install Python packages ###
COPY {{ Path.Version }}/deps/python_requirements.txt /tmp/requirements.txt
{{ python.run_install_packages(Dependencies.python, requirements_file='/tmp/requirements.txt') }}

### Install R ###
{{ r.run_install(Dependencies.R) }}
{%- endif %}

### Install Package Manager {{ Image.Version }} ###
COPY --chmod=0755 {{ Path.Version }}/scripts/install_package_manager.sh /tmp/install_package_manager.sh
RUN {% if Image.Variant != "Minimal" %}PYTHON_VERSION={{ Dependencies.python.0 }} R_VERSION={{ Dependencies.R.0 }} {% endif %}{% if Image.DownloadURL is defined %}DOWNLOAD_URL="{{ Image.DownloadURL }}" {% endif %}\
/tmp/install_package_manager.sh \
&& rm -f /tmp/install_package_manager.sh

### Add startup.sh script ###
COPY --chmod=0775 {{ Path.Version }}/scripts/startup.sh /usr/local/bin/startup.sh
RUN mkdir -p /var/run/rstudio-pm \
&& chmod +x /usr/local/bin/startup.sh \
&& chown rstudio-pm:rstudio-pm /usr/local/bin/startup.sh \
&& chown -R rstudio-pm:rstudio-pm /var/run/rstudio-pm

USER rstudio-pm

RUN echo "source <(rspm completion bash)" >> ~/.bashrc

CMD ["/usr/local/bin/startup.sh"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
libc6
openssl
Loading