sdk-container-builds icon indicating copy to clipboard operation
sdk-container-builds copied to clipboard

CONTAINER1012 Error

Open carlcamilleri opened this issue 1 year ago • 1 comments

Hi,

I am attempting to publish a project to a docker image from WSL2 but keep encountering CONTAINER1012, I would appreciate some pointers on this, please.

Setup details:

  1. OS: Windows 11 with WSL2 Ubuntu 24.04.1
  2. Container Management: Rancher Desktop 1.16.0

Publish Command:

dotnet publish "./myproj.csproj" -t:PublishContainer --verbosity "quiet" --nologo -p:ContainerRepository="myproj" -p:ContainerImageTag="latest"

Error encountered:

/home/myname/.dotnet/sdk/8.0.403/Containers/build/Microsoft.NET.Build.Containers.targets(242,5): error CONTAINER1012: The local registry is not available, but pushing to a local registry was requested

Below are the output of several commands executed within WSL2:

dotnet --list-sdks
8.0.303 [/home/ccamilleri/.dotnet/sdk]
8.0.403 [/home/ccamilleri/.dotnet/sdk]
docker images
REPOSITORY                                                                                   TAG              IMAGE ID       CREATED        SIZE
mcr.microsoft.com/dotnet/runtime-deps                                                        8.0-alpine       17542c7a86e6   2 weeks ago    16.2MB
mcr.microsoft.com/dotnet/sdk                                                                 8.0              70d4f0c5224d   2 weeks ago    836MB
docker info
Client:
 Version:    27.2.1-rd
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.17.1
    Path:     /mnt/c/Program Files/Rancher Desktop/resources/resources/linux/docker-cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.29.5
    Path:     /mnt/c/Program Files/Rancher Desktop/resources/resources/linux/docker-cli-plugins/docker-compose
WARNING: Plugin "/usr/local/lib/docker/cli-plugins/docker-debug" is not valid: failed to fetch metadata: fork/exec /usr/local/lib/docker/cli-plugins/docker-debug: no such file or directory
WARNING: Plugin "/usr/local/lib/docker/cli-plugins/docker-desktop" is not valid: failed to fetch metadata: fork/exec /usr/local/lib/docker/cli-plugins/docker-desktop: no such file or directory
WARNING: Plugin "/usr/local/lib/docker/cli-plugins/docker-dev" is not valid: failed to fetch metadata: fork/exec /usr/local/lib/docker/cli-plugins/docker-dev: no such file or directory
WARNING: Plugin "/usr/local/lib/docker/cli-plugins/docker-extension" is not valid: failed to fetch metadata: fork/exec /usr/local/lib/docker/cli-plugins/docker-extension: no such file or directory
WARNING: Plugin "/usr/local/lib/docker/cli-plugins/docker-feedback" is not valid: failed to fetch metadata: fork/exec /usr/local/lib/docker/cli-plugins/docker-feedback: no such file or directory
WARNING: Plugin "/usr/local/lib/docker/cli-plugins/docker-init" is not valid: failed to fetch metadata: fork/exec /usr/local/lib/docker/cli-plugins/docker-init: no such file or directory
WARNING: Plugin "/usr/local/lib/docker/cli-plugins/docker-sbom" is not valid: failed to fetch metadata: fork/exec /usr/local/lib/docker/cli-plugins/docker-sbom: no such file or directory
WARNING: Plugin "/usr/local/lib/docker/cli-plugins/docker-scout" is not valid: failed to fetch metadata: fork/exec /usr/local/lib/docker/cli-plugins/docker-scout: no such file or directory

Server:
 Containers: 10
  Running: 8
  Paused: 0
  Stopped: 2
 Images: 19
 Server Version: 26.1.5
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: runc io.containerd.runc.v2
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 3a4de459a68952ffb703bbe7f2290861a75b6b67
 runc version: 2c9f5602f0ba3d9da1c2596322dfc4e156844890
 init version:
 Security Options:
  seccomp
   Profile: builtin
 Kernel Version: 5.15.167.4-microsoft-standard-WSL2
 Operating System: Rancher Desktop WSL Distribution
 OSType: linux
 Architecture: x86_64
 CPUs: 14
 Total Memory: 31.35GiB
 Name: Carl-LPTP
 ID: e14cf62c-574f-45d4-9ee7-f64a6a955bc5
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: No blkio throttle.read_bps_device support
WARNING: No blkio throttle.write_bps_device support
WARNING: No blkio throttle.read_iops_device support
WARNING: No blkio throttle.write_iops_device support

carlcamilleri avatar Nov 29 '24 12:11 carlcamilleri