particle-os-cli/templates/Containerfile
xyny 42d879a6e5
chore: use GHCR for install.sh (#11)
Trying to make the action install the binary from the container on GHCR
with `podman run --rm ghcr.io/blue-build/cli:main-installer | sudo bash`
(like in the README). Getting some error and this _might_ be related and
might not, but shouldn't hurt to merge either, since I just made the
`cli` package public.

---------

Co-authored-by: Gerald Pinder <gmpinder@gmail.com>
2024-01-24 17:27:51 -05:00

47 lines
1.7 KiB
Docker

FROM {{ recipe.base_image }}:{{ recipe.image_version }}
LABEL org.opencontainers.image.title="{{ recipe.name }}"
LABEL org.opencontainers.image.version="{{ recipe.image_version }}"
LABEL org.opencontainers.image.description="{{ recipe.description }}"
LABEL io.artifacthub.package.readme-url=https://raw.githubusercontent.com/ublue-os/startingpoint/main/README.md
LABEL io.artifacthub.package.logo-url=https://avatars.githubusercontent.com/u/120078124?s=200&v=4
ARG RECIPE={{ recipe_path.display() }}
{%- if self::running_gitlab_actions() %}
ARG IMAGE_REGISTRY=ghcr.io/ublue-os
COPY cosign.pub /usr/share/ublue-os/cosign.pub
{%- endif %}
# Copy the bling from ublue-os/bling into tmp, to be installed later by the bling module
# Feel free to remove these lines if you want to speed up image builds and don't want any bling
COPY --from=ghcr.io/ublue-os/bling:latest /rpms /tmp/bling/rpms
COPY --from=ghcr.io/ublue-os/bling:latest /files /tmp/bling/files
COPY --from=docker.io/mikefarah/yq /usr/bin/yq /usr/bin/yq
COPY --from=gcr.io/projectsigstore/cosign /ko-app/cosign /usr/bin/cosign
COPY --from=ghcr.io/blue-build/cli:
{%- if let Some(tag) = recipe.blue_build_tag -%}
{{ tag }}
{%- else -%}
latest-installer
{%- endif %} /out/bb /usr/bin/bb
COPY config /tmp/config/
# Copy modules
# The default modules are inside ublue-os/bling
COPY --from=ghcr.io/ublue-os/bling:latest /modules /tmp/modules/
# Custom modules overwrite defaults
COPY modules /tmp/modules/
RUN printf {{ self::print_script(export_script) }} >> /tmp/exports.sh && chmod +x /tmp/exports.sh
ARG CONFIG_DIRECTORY="/tmp/config"
ARG IMAGE_NAME="{{ recipe.name }}"
ARG BASE_IMAGE="{{ recipe.base_image }}"
{{ recipe.modules_ext }}
RUN rm -rf /tmp/* /var/* && ostree container commit