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

Missing folder /etc/docker after fresh install #4016

Open
CTaeumel opened this issue Feb 9, 2023 · 2 comments
Open

Missing folder /etc/docker after fresh install #4016

CTaeumel opened this issue Feb 9, 2023 · 2 comments

Comments

@CTaeumel
Copy link

CTaeumel commented Feb 9, 2023

Description

The current version of docker (Ubuntu 20.04 & 22.04) according to https://docs.docker.com/engine/install/ubuntu/ (Packages: docker-ce docker-ce-cli containerd.io) doesn't create the folder /etc/docker . I think this is a bug, because past versions have created this folder.

Reproduce

  1. sudo apt-get update
  2. sudo apt-get install ca-certificates curl gnupg lsb-release
  3. sudo mkdir -m 0755 -p /etc/apt/keyrings
  4. curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
  5. echo
    "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu
    $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
  6. sudo apt-get update
  7. sudo apt-get install docker-ce docker-ce-cli containerd.io
    --> /etc/docker is missing

Expected behavior

/etc/docker is existing

docker version

Client: Docker Engine - Community
 Version:           23.0.0
 API version:       1.42
 Go version:        go1.19.5
 Git commit:        e92dd87
 Built:             Wed Feb  1 17:49:08 2023
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          23.0.0
  API version:      1.42 (minimum version 1.12)
  Go version:       go1.19.5
  Git commit:       d7573ab
  Built:            Wed Feb  1 17:49:08 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.16
  GitCommit:        31aa4358a36870b21a992d3ad2bef29e1d693bec
 runc:
  Version:          1.1.4
  GitCommit:        v1.1.4-0-g5fd4c4d
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

docker info

Client: Docker Engine - Community
 Version:           23.0.0
 API version:       1.42
 Go version:        go1.19.5
 Git commit:        e92dd87
 Built:             Wed Feb  1 17:49:08 2023
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          23.0.0
  API version:      1.42 (minimum version 1.12)
  Go version:       go1.19.5
  Git commit:       d7573ab
  Built:            Wed Feb  1 17:49:08 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.16
  GitCommit:        31aa4358a36870b21a992d3ad2bef29e1d693bec
 runc:
  Version:          1.1.4
  GitCommit:        v1.1.4-0-g5fd4c4d
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
degkm@sandbox-ubuntu-2004:~$ sudo docker info
Client:
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.10.2
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.15.1
    Path:     /usr/libexec/docker/cli-plugins/docker-compose
  scan: Docker Scan (Docker Inc.)
    Version:  v0.23.0
    Path:     /usr/libexec/docker/cli-plugins/docker-scan

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 0
 Server Version: 23.0.0
 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 logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 31aa4358a36870b21a992d3ad2bef29e1d693bec
 runc version: v1.1.4-0-g5fd4c4d
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin
 Kernel Version: 5.4.0-137-generic
 Operating System: Ubuntu 20.04.5 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 7.771GiB
 Name: sandbox-ubuntu-2004
 ID: b646fedd-c911-41ec-991d-152dc0ed73ff
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: No swap limit support

Additional Info

No response

@bsousaa
Copy link
Contributor

bsousaa commented Feb 9, 2023

quoting from: jpetazzo/container.training#625 (comment)

We were discussing this, and the /etc/docker directory was previously created as a side-effect of a legacy functionality for schema 2 v1 images ("libtrust"), which created a key.json in this path.
In general, as this directory is not guaranteed to be present (it's an optional path to store config files). That said, we'll make a change in the .deb and .rpm packages to automatically create an empty directory on installation;

docker/docker-ce-packaging#841
docker/docker-ce-packaging#842

This directory is not guaranteed to be there. If you need create it manually first.

(docs may need some improvement to explain this better)

@neersighted
Copy link
Member

This is also in the 23.0.1 release notes:

Add /etc/docker to RPM and DEB packaging. docker/docker-ce-packaging#842
Not all use cases will benefit; if you depend on this, you should explicitly mkdir -p /etc/docker.

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

No branches or pull requests

4 participants