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

Run images are not pulled when using extensions #1686

Closed
Tracked by #224
mhdawson opened this issue Mar 27, 2023 · 4 comments · Fixed by #1730
Closed
Tracked by #224

Run images are not pulled when using extensions #1686

mhdawson opened this issue Mar 27, 2023 · 4 comments · Fixed by #1730
Labels
status/ready Issue ready to be worked on. type/bug Issue that reports an unexpected behaviour.
Milestone

Comments

@mhdawson
Copy link

mhdawson commented Mar 27, 2023

Summary

We've been working on a Node.js extension to support ubi. We have been able to
build an extension and a builder that uses it and its in https://github.com/nodeshift/ubi-nodejs-extension,
along with instructions on how to try it out.

One issue which I came across which I think is a bug in pack is that the run images that
an exention switches to are not automatically pulled by pack. This means that the user needs
to pull them in advance ( step 7 in https://github.com/nodeshift/ubi-nodejs-extension/blob/main/README.md#usage).
I don't think the user should have to know the full set of possible images for the run image and have
to pull them all down in advance.

Reproductions

Steps

Follow the steps in https://github.com/nodeshift/ubi-nodejs-extension/blob/main/README.md#usage and omit step 7.

Current behavior

An error is returned indicating the top level app image is empty (which was confusing to me)

Expected behavior

The run image is automatically pulled and the application builds successfully.

Environment

pack info
user1@fedora testit]$ pack report
Pack:
  Version:  0.28.0+git-b10e41f.build-3729
  OS/Arch:  linux/amd64

Default Lifecycle Version:  0.15.2

Supported Platform APIs:  0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.10

Config:
  default-builder-image = "[REDACTED]"
docker info
[user1@fedora testit]$ docker info
Client:
 Context:    default
 Debug Mode: false
 Plugins:
  app: Docker App (Docker Inc., v0.9.1-beta3)
  buildx: Docker Buildx (Docker Inc., v0.9.1-docker)
  compose: Docker Compose (Docker Inc., v2.12.2)
  scan: Docker Scan (Docker Inc., v0.21.0)

Server:
 Containers: 12
  Running: 1
  Paused: 0
  Stopped: 11
 Images: 43
 Server Version: 20.10.21
 Storage Driver: btrfs
  Build Version: Btrfs v6.0
  Library Version: 102
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 770bd0108c32f3fb5c73ae1264f7e503fe7b2661
 runc version: v1.1.4-0-g5fd4c4d
 init version: de40ad0
 Security Options:
  seccomp
   Profile: default
  cgroupns
 Kernel Version: 6.0.7-301.fc37.x86_64
 Operating System: Fedora Linux 37 (Workstation Edition)
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 7.663GiB
 Name: fedora
 ID: DEET:EZQI:TY36:OJ3S:CYPH:H4JR:JQAJ:XO7S:GTNM:EZTL:GDXE:DZBX
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Username: mhdawson
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  localhost:5000
  172.17.0.1:5000
  127.0.0.0/8
 Live Restore Enabled: false
@mhdawson mhdawson added status/triage Issue or PR that requires contributor attention. type/bug Issue that reports an unexpected behaviour. labels Mar 27, 2023
@natalieparellano
Copy link
Member

@mhdawson thanks for the issue - I think the solution you are describing makes sense. pack should check for the run image in analyzed.toml after the extend phase and pull the run image prior to export.

@natalieparellano natalieparellano added status/ready Issue ready to be worked on. and removed status/triage Issue or PR that requires contributor attention. labels Mar 27, 2023
@natalieparellano natalieparellano added this to the 0.30.0 milestone Mar 27, 2023
@natalieparellano
Copy link
Member

Should be fixed when #1730 lands

@mhdawson
Copy link
Author

@natalieparellano thanks for the update.

@natalieparellano natalieparellano linked a pull request May 15, 2023 that will close this issue
2 tasks
mhdawson added a commit to mhdawson/ubi-nodejs-extension-1 that referenced this issue May 29, 2023
Pulling run images manually is no longer required after
buildpacks/pack#1686 was fixed.

Signed-off-by: Michael Dawson <mdawson@devrus.com>
@mhdawson
Copy link
Author

mhdawson commented May 29, 2023

@natalieparellano validated that it now works and submitted PR to update instructions for extension to remove step that said to pull the images - paketo-community/ubi-nodejs-extension#2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/ready Issue ready to be worked on. type/bug Issue that reports an unexpected behaviour.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants