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

Update packages to use alpine base (plus other cleanups) #1856

Merged
merged 17 commits into from
May 18, 2017

Conversation

rn
Copy link
Member

@rn rn commented May 18, 2017

  • Build packages previously using alpine:3.5 or other to use the linuxkit/alpine as the base
    • Added additional packages to base
    • Typically installed required packages one stage in /out and then copy them into a scratch stage
  • alpine:edge comes with tini, so switch packages to use that and remove our home-build tini package
  • remove the toybox package. It was only used by the kernel packages and is not essential
  • Make Hub org/repository build-time configurable use make ... ORG=foo (resolves Set docker hub repository linuxkit as variable  #1824)
  • Update all YAML files to use the new packages

I've test this with the linuxkit and docker images and hyperkit and qemu

image

rn added 17 commits May 18, 2017 18:55
The added packages are necessary to create a base Alpine
container image and for converting more packages.

Update the versions file to the latest versions

Also make the HUB org/registry build time configurable.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
Also make the HUB org/registry build time configurable
for these packages.

Others will be reworked in sub sequent commits.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
We only need the alpine-baselayout packe to run init. This also
removes the sha256 import from alpine:edge.

This also reduces the size of the init package by more than
50% to just 1.5MB.

Also make the HUB org/registry build time configurable.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
The dhcpcd package only needs a basic alpine-baselayout and
dhcpcd. This reduces the size of the package from 4.3MB to 1.8MB.

Also make the HUB org/registry build time configurable.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
Also make the HUB org/registry build time configurable.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
Also make the HUB org/registry build time configurable.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
Also make the HUB org/registry build time configurable.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
Also make the HUB org/registry build time configurable.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
Also convert to a multi-stage build and make the
make the HUB org/registry build time configurable.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
Also convert it to a multi-stage build and make
the HUB org/registry build time configurable.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This makes the package slightly bigger as tini from Alpine
is not statically linked but removes the dependency on
./tools/tini

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
All users in ./pkg and ./test have been converted to use
tini from the alpine base image.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
You cna extract/inspect the contents with 'docker save' + 'tar'

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
Update the Makefiles of the remaining packages.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
RUN apk add --no-cache --initdb -p /out alpine-baselayout busybox musl

# Remove apk residuals. We have a read-only rootfs, so apk is of no use.
RUN rm -rf /out/etc/apk /out/lib/apk /out/var/cache
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually init is where I still sometimes use apk add for debug (you can remount rw), but I guess we should get rid of these now...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hopefully soon we have a dev container in which we should maybe not disabled apk

@rn rn merged commit 88b6077 into linuxkit:master May 18, 2017
@rn rn deleted the alpine-base branch May 18, 2017 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set docker hub repository linuxkit as variable
3 participants