Docker Strange Issues

Hi,

Have see issue from docker with this command :
docker container ls --format json NOK
But this command work : docker container ls --format='{{json .}}' OK

Other strange issue is with docker build by default when you install docker-buildx you just run docker build and is not need to run docker buildx build
For bypass i need to set DOCKER_BUILDKIT=1

Nix configuration :

# Docker
  virtualisation.docker.enable = true;
  virtualisation.docker.storageDriver = "overlay2";
  virtualisation.docker.rootless = {
        enable = true;
        setSocketVariable = true;
  };

Docker Info :

Client:
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc., v0.10.4)
  compose: Docker Compose (Docker Inc., 2.18.1)

Server:
 Containers: 9
  Running: 6
  Paused: 0
  Stopped: 3
 Images: 28
 Server Version: 20.10.25
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: false
  userxattr: true
 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: v1.7.1
 runc version: 
 init version: 
 Security Options:
  seccomp
   Profile: default
  rootless
  cgroupns
 Kernel Version: 6.6.2
 Operating System: NixOS 23.05 (Stoat)
 OSType: linux
 Architecture: x86_64
 CPUs: 12
 Total Memory: 15.3GiB
 Name: nixos
 ID: 5V3B:RRSG:M742:6UIR:HKSK:PTTT:3G6Q:2SJL:RKHV:Z76P:X6QE:5QFI
 Docker Root Dir: /home/pc/.local/share/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: No cpuset support

Nix Packages installed :

docker
docker-compose
docker-buildx

Why nixOS don’t understand this command correctly ?
And if you have idea how to fix that ?

Best Regards

Fixed by upgrading docker to 24.x

nix-channel --add https://channels.nixos.org/nixos-unstable nixos
nixos-rebuild switch --upgrade
1 Like

Can i enquire what your use case for docker is just out of curiosity.

Hi,

Yes no problem.
It’s to set up an infrastructure for my work.
This is fully automated.

Sincerely

okay mr green skull, good luck.

nix can build anything, even docker containers!! :slight_smile:

if you gave it some bricks it would be build a wall. lol!