Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add buildpacksio/pack:<version>-base images to delivery #1951

Merged
merged 3 commits into from
Oct 30, 2023
Merged

Conversation

natalieparellano
Copy link
Member

Summary

I still need to test this out end-to-end but I think this should resolve #1554 by adding a pack image based on ubuntu:jammy to our delivery pipeline.

Output

Before

We publish:

  • buildpacksio/pack:0.X.Y (version such as 0.31.0)
  • buildpacksio/pack:latest

After

We publish:

  • buildpacksio/pack:0.X.Y (version such as 0.31.0) <- still a tiny image
  • buildpacksio/pack:latest <- still a tiny image
  • buildpacksio/pack:0.X.Y-base <- based on jammy

Documentation

  • Should this change be documented?
    • Yes, see #___
    • No

Related

Resolves #1554

@@ -16,12 +16,21 @@ on:
default: false

env:
BUILDER: "paketobuildpacks/builder-jammy-tiny"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No longer needed since we don't use the pack action to build pack.

FROM golang:1.20 as builder
ARG pack_version
ENV PACK_VERSION=$pack_version
WORKDIR /app
COPY . .
RUN make build

FROM scratch
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We base the lifecycle image on gcr.io/distroless/static, so it might make sense here as well. It's not as small as scratch but it avoids the need for branching logic in the Dockerfile.

@github-actions github-actions bot added this to the 0.32.0 milestone Oct 27, 2023
@github-actions github-actions bot added the type/chore Issue that requests non-user facing changes. label Oct 27, 2023
@natalieparellano
Copy link
Member Author

Tested on fork, this appears to work fine: https://github.com/natalieparellano/pack/actions/runs/6670247077

$  docker run --rm natalieparellano/pack:latest version
0.1027.2+git-fa1945d
$  docker run --rm --entrypoint /bin/sh natalieparellano/pack:latest
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "/bin/sh": stat /bin/sh: no such file or directory: unknown.
$  docker run --rm natalieparellano/pack:0.1027.2 version
0.1027.2+git-fa1945d
$  docker run --rm --entrypoint /bin/sh natalieparellano/pack:0.1027.2
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "/bin/sh": stat /bin/sh: no such file or directory: unknown.
$  docker run --rm natalieparellano/pack:0.1027.2-base version
0.1027.2+git-fa1945d
$  docker run --rm --entrypoint /bin/sh natalieparellano/pack:0.1027.2-base
(succeeds)

@natalieparellano natalieparellano marked this pull request as ready for review October 27, 2023 17:50
@natalieparellano natalieparellano requested review from a team as code owners October 27, 2023 17:50
@natalieparellano
Copy link
Member Author

Perhaps there's a better tagging schema vs pack:<version>-base. I'm happy to make updates based on suggestions.

Signed-off-by: Natalie Arellano <[email protected]>
@natalieparellano
Copy link
Member Author

I imagine folks using a "base" image will want a floating tag for the latest version, so I added 01fbd91

@jkutner jkutner enabled auto-merge October 30, 2023 21:32
@jkutner jkutner merged commit a1bc205 into main Oct 30, 2023
15 checks passed
@jkutner jkutner deleted the pack-image branch October 30, 2023 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/chore Issue that requests non-user facing changes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to use buildpacksio/pack:latest image in GitLab
2 participants