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

[BUG] Getting No such file or directory when including OCI artifact using Docker remote #11398

Closed
parisk opened this issue Jan 24, 2024 · 4 comments
Labels

Comments

@parisk
Copy link

parisk commented Jan 24, 2024

Description

Cannot include an OCI artifact published with docker compose alpha publish (#10949), as I am getting a "No such file or directory error":

open /home/runner/work/docker-remote-include-test/docker-remote-include-test/docker:ghcr.io/parisk/docker-remote-include-test: no such file or directory

Compose file published at ghcr.io/parisk/docker-remote-include-test:latest1

services:
  nginx-1:
    image: nginx:1.25.3

  nginx-2:
    image: nginx:1.25.3

Compose file attempting to render:

include:
  - docker:ghcr.io/parisk/docker-remote-include-test:latest

Full example, along with GitHub Actions available here: https://github.com/parisk/docker-remote-include-test.

Steps To Reproduce

  1. Publish Docker Compose file1 as OCI artifact with docker compose alpha publish2
  2. Include the OCI artifact using the Docker remote in include3
  3. Run docker compose config with COMPOSE_EXPERIMENTAL_OCI_REMOTE=true 4

Compose Version

v2.23.3

Docker Environment

Client: Docker Engine - Community
 Version:    24.0.7
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.11.2
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.23.3
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 14
 Server Version: 24.0.7
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: false
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 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 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: a1496014c916f9e62104b33d1bb5bd03b0858e59
 runc version: v1.1.11-0-g4bccb38
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.2.0-1018-azure
 Operating System: Ubuntu 22.04.3 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 15.61GiB
 Name: fv-az915-576
 ID: 292c307e-7759-4287-bc1a-499fe02d4acf
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Username: githubactions
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Anything else?

No response

Footnotes

  1. https://github.com/parisk/docker-remote-include-test/pkgs/container/docker-remote-include-test 2

  2. https://github.com/parisk/docker-remote-include-test/actions/runs/7638022297/job/20808050719#step:5:1

  3. https://github.com/parisk/docker-remote-include-test/actions/runs/7638022297/job/20808081715#step:5:1

  4. https://github.com/parisk/docker-remote-include-test/actions/runs/7637924936/job/20807774137#step:5:1

@ndeloof
Copy link
Contributor

ndeloof commented Feb 12, 2024

OCI artifact support uses oci://<repository> syntax, not docker:...
Also, this feature only is available when compose command is ran when COMPOSE_EXPERIMENTAL_OCI_REMOTE=1 variable is set

@ndeloof
Copy link
Contributor

ndeloof commented Feb 12, 2024

$ cat compose.yaml 
include:
  - oci://ghcr.io/parisk/docker-remote-include-test:latest
$ COMPOSE_EXPERIMENTAL_OCI_REMOTE=1 docker compose config
failed to authorize: failed to fetch anonymous token: unexpected status from GET request to https://ghcr.io/token?scope=repository%3Aparisk%2Fdocker-remote-include-test%3Apull&service=ghcr.io: 401 Unauthorized

parisk added a commit to parisk/docker-remote-include-test that referenced this issue Feb 19, 2024
@parisk
Copy link
Author

parisk commented Feb 19, 2024

Thanks a lot, it worked now! Is there any documentation for this syntax? I looked at the Docker documentation website and could not find one.

I just followed #10949, which suggested docker:, instead of oci://. I am happy to contribute the documentation, wherever it seems more suitable.

Regardless, my issue was resolved, so I am closing this.

@parisk parisk closed this as completed Feb 19, 2024
@ndeloof
Copy link
Contributor

ndeloof commented Feb 19, 2024

Not yet part of the documentation, as an experimental feature, to be added

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants