Commit Graph

6 Commits (c0ddfae186b8bb658f8f11e30393a2b5bc9b82ca)

Author SHA1 Message Date
Maxim Skokov f673c56eaf Dockerfile.rootfs: drop dangling /etc/resolv.conf symlink
The rootfs image ships /etc/resolv.conf as a symlink to /tmp/resolv.conf.
In a build context /tmp is empty, so the symlink dangles and older buildkit
fails any RUN step on the image with:

  make mountpoint "/etc/resolv.conf": file exists

when it tries to bind-mount the build-time resolv.conf over it. Docker
injects its own /etc/resolv.conf at runtime regardless, so the shipped
symlink serves no purpose in the container image. Remove it in the builder
stage before it is copied into the final scratch image.

Verified with `docker save` that no layer contains etc/resolv.conf after the
change, and that DNS still resolves at runtime via Docker's mounted
resolv.conf (nslookup downloads.openwrt.org succeeds).

Fixes: https://github.com/openwrt/docker/issues/191
Signed-off-by: Maxim Skokov <skokov.m020709@gmail.com>
2026-08-17 09:41:15 +02:00
Petr Štetiar 648a9bd5ba
Dockerfile: fix GPG keys permission issues during container setup
Currently the container initial setup using setup.sh fails:

  rm: cannot remove '/builder/keys/88CA59E8.asc': Permission denied
  rm: cannot remove '/builder/keys/CD54E82DADB3684D.asc': Permission denied
  rm: cannot remove '/builder/keys/2074BE7A.asc': Permission denied
  rm: cannot remove '/builder/keys/0x1D53D1877742E911.asc': Permission denied
  rm: cannot remove '/builder/keys/626471F1.asc': Permission denied

That is happening due to PEBKAC, where I didn't realized, that there is
such additional setup.sh happening. So lets fix it by adding the keys
with correct owner.

Link: https://github.com/openwrt/docker/pull/165
References: https://github.com/openwrt/packages/actions/runs/14242829383/job/39916509620?pr=26225
Fixes: #164
Fixes: 79999f3c7e ("Dockerfile: fix rootfs container generation")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2025-04-03 19:21:04 +00:00
Petr Štetiar 79999f3c7e
Dockerfile: fix rootfs container generation
Currently several rootfs containers are failing to build, as the
buildbot user doesn't exists in those FROM:scratch containers:

  /usr/bin/docker buildx build (snip) --build-arg USER=root --build-arg BASE_IMAGE=scratch (snip)
  ...snip...
  #2 [1/5] ADD --chown=buildbot:buildbot keys/*.asc /builder/keys/
  #2 ERROR: invalid user index: -1

So lets fix it by avoiding need for ownership and simply import the keys
through pipe. Move the gpg key import into setup.sh script as well,
since this is the place where the keys are being used.

Also add a new Dockerfile.rootfs that must be used to generate a rootfs
container as the generic Dockerfile is not able to build the rootfs image.

Fixes: 9b55784b18 ("BREAKING: use setup.sh instead of Dockerfile")
References: https://github.com/openwrt/routing/pull/1107#issuecomment-2768156513
References: https://github.com/openwrt/docker/actions/runs/14165468179/job/39681375639#step:9:243
Link: https://github.com/openwrt/docker/pull/161
Acked-by: Paul Spooren <mail@aparcar.org>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2025-04-03 05:02:09 +00:00
Paul Spooren a633a801af ci: drop GitLab
Signed-off-by: Paul Spooren <mail@aparcar.org>
2023-04-21 00:15:52 +02:00
Paul Spooren 35cefd1f4f refactor: unify sdk and imagebuilder
both setups are similar enough to be unified.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2019-08-03 00:37:32 +02:00
Paul Spooren bcff431098 init
Initial push to use openwrtorg. Generatres rootfs, sdk and imagebuilder
for now.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2019-07-09 14:42:14 +02:00