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

Use custom dind image based on alpine #251

Merged
3 commits merged into from
Aug 16, 2021
Merged

Use custom dind image based on alpine #251

3 commits merged into from
Aug 16, 2021

Conversation

klutchell
Copy link
Contributor

@klutchell klutchell commented Jul 22, 2021

Support additional platforms like armv7 by building our own DinD image.

brainstorm discussions

@klutchell
Copy link
Contributor Author

Tested on my workstation:

Linux system76 5.11.0-7620-generic #21~1624379747~21.04~3abeff8-Ubuntu SMP Wed Jun 23 02:34:03 UTC  x86_64 x86_64 x86_64 GNU/Linux
Client: Docker Engine - Community
 Version:           20.10.7
 API version:       1.41
 Go version:        go1.13.15
 Git commit:        f0df350
 Built:             Wed Jun  2 11:56:41 2021
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.7
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       b0f5bc3
  Built:            Wed Jun  2 11:54:53 2021
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.6
  GitCommit:        d71fcd7d8303cbf684402823e425e9dd2e99285d
 runc:
  Version:          1.0.0-rc95
  GitCommit:        b9ee9c6314599f1b4a7f497e1f1f856fe433d3b7
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

@tmigone
Copy link

tmigone commented Jul 27, 2021

@klutchell I just tested this PR combined with #252 it and it worked great, details on my workstation below in case they help. I noticed however that the final compressed image size while smaller is not that big of a difference, it's down to 96MB from 103MB so ~7-8%. I'm not complaining, i'll take any improvement we can find but since you mentioned we are not using most of the official docker tools I wonder why the difference is "so small"?

Maybe @rahul-thakoor can help us further reduce the image? :D

ubuntu@balena:~/$ uname -a
Linux balena 5.4.0-77-generic #86-Ubuntu SMP Thu Jun 17 02:35:03 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

ubuntu@balena:~/$ docker info
Client:
 Context:    default
 Debug Mode: false
 Plugins:
  app: Docker App (Docker Inc., v0.9.1-beta3)
  buildx: Build with BuildKit (Docker Inc., v0.5.1-docker)
  scan: Docker Scan (Docker Inc., v0.8.0)

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 1
 Server Version: 20.10.7
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  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 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: d71fcd7d8303cbf684402823e425e9dd2e99285d
 runc version: b9ee9c6314599f1b4a7f497e1f1f856fe433d3b7
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: default
 Kernel Version: 5.4.0-77-generic
 Operating System: Ubuntu 20.04.2 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 1
 Total Memory: 3.844GiB
 Name: balena
 ID: G4LX:JHQA:LF4Y:J447:ZV6G:V5KJ:ZHJS:IVGX:TPIY:QUQA:OCBX:XLPZ
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Username: tmigone
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: No swap limit support

@klutchell
Copy link
Contributor Author

@tmigone Thanks for helping to test! Most of the space is the docker binaries so we can't reduce it much further.

The one potential benefit this brings is armv6 and armv7 support since docker stopped publishing those images at v19.03

But do we even want/need to support preload on 32-bit ARM devices? I know there is a use case for testbot, and some users are trying it, but that doesn't mean we need to support it when the official images don't. Will probably end up on a product call at some point.

See this discussion: balena-io/balena-cli#2290 (comment)

@klutchell
Copy link
Contributor Author

@balena-ci retest

@klutchell
Copy link
Contributor Author

@balena-ci retest

This allows us to continue supporting armv7 even though
the official dind images stopped at docker v19.

Change-type: minor
Signed-off-by: Kyle Harding <[email protected]>
Currently the daemon will slow startup to print some warnings
if we don't include this flag. Future releases will require this
flag in order to start insecure mode at all.

Change-type: patch
Signed-off-by: Kyle Harding <[email protected]>
In sfdisk 2.35.2 both --json and --dump are exclusive
args and cannot be used together.

Change-type: patch
Signed-off-by: Kyle Harding <[email protected]>
@klutchell klutchell marked this pull request as ready for review August 5, 2021 14:41
@klutchell
Copy link
Contributor Author

@balena-ci I self-certify!

@ghost ghost merged commit f1c791c into master Aug 16, 2021
@ghost ghost deleted the custom-dind branch August 16, 2021 12:30
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants