60 Commits

Author SHA1 Message Date
Justin Kromlinger
74dc761af8
Add additional opencontainers labels, fix version id 2023-06-08 20:18:07 +02:00
Kristian Klausen
44c5b4f90e
Adjust the path to "pacman-extra.conf" for devtools>=1.0.0 2023-05-26 22:01:42 +02:00
nl6720
f3f1068b7a
Do not pass a keyring name to pacman-key
If the keyring is not specified, pacman-key will simply use all keyrings from /usr/share/pacman/keyrings/.
2022-06-17 18:22:48 +03:00
nl6720
18e8a88aec
Use C.UTF-8
The glibc 2.35-6 package ships with the C.UTF-8 locale included.
This means there is now a UTF-8 locale available by default and en_US.UTF-8, which requires editing /etc/locale.gen and running locale-gen, is not needed anymore.
2022-06-17 08:28:46 +03:00
Justin Kromlinger
5a681fd335
Add date and build number as VERSION_ID to /etc/os-release
Resolves #68
2022-06-16 17:04:25 +02:00
Justin Kromlinger
47a614ade9
Add --long to zstd call 2022-04-14 01:02:30 +02:00
Justin Kromlinger
d47ca225ee
Replace xz with zstd
Closes #63.

Using `zstd -T0 -8` instead of `gz -T0 -9` results in a larger rootfs
file, but requires significantly less time and memory:

```

zstd  -3 115M   1.60user 0.18system 0:00.32elapsed 557%CPU (0avgtext+0avgdata  130212maxresident)k
zstd  -6 107M   5.03user 0.24system 0:00.72elapsed 729%CPU (0avgtext+0avgdata  149660maxresident)k
zstd  -7 106M   7.33user 0.29system 0:01.04elapsed 728%CPU (0avgtext+0avgdata  174368maxresident)k
zstd  -8 105M   8.45user 0.27system 0:01.23elapsed 707%CPU (0avgtext+0avgdata  173008maxresident)k
zstd  -9 104M   9.35user 0.37system 0:01.42elapsed 683%CPU (0avgtext+0avgdata  335920maxresident)k
zstd -13 104M  30.57user 0.31system 0:04.76elapsed 648%CPU (0avgtext+0avgdata  498740maxresident)k
zstd -19  91M 132.06user 0.53system 0:21.98elapsed 603%CPU (0avgtext+0avgdata 1106328maxresident)k
xz    -9  81M 105.71user 0.58system 0:58.24elapsed 182%CPU (0avgtext+0avgdata 2006964maxresident)k
```

Additionally this drops bash from the build Dockerfile, since `SHELL` is
not OCI compliant.
2022-04-13 17:48:07 +02:00
Justin Kromlinger
30d0b5b130
Parametrize 'docker' command
Allows 'make image-base DOCKER=podman'

Originally from: Grzegorz Klimaszewski <2612193+grzegorzk@users.noreply.github.com>
https://github.com/archlinux/archlinux-docker/pull/38/files

Closes #51.
2022-04-13 16:46:25 +02:00
Justin Kromlinger
e8d7daa790
Avoid curl call on local builds 2021-09-18 16:11:09 +02:00
Santiago Torres
eb0c127ba6
Makefile: use sysusers directly
Instead of using the libalpm systemd-syusers hook, use sysusers
directly. The --root parameter allows us to avoid using the host's
namespace and populate using the conf files in the target's build
directory.
2020-12-11 16:00:56 +01:00
Justin Kromlinger
3e3b44b68c
Move sysusers call back to Dockerfile
Resolves #52. Added small tests for user/group counts.
2020-12-11 16:00:51 +01:00
Justin Kromlinger
6b36cb9812
Provide a pretty release link in the Dockerfile
Resolves #49.
2020-11-18 19:04:34 +01:00
Justin Kromlinger
17b668efb4
Add configuration files before we run locale-gen 2020-11-07 21:14:58 +01:00
Justin Kromlinger
f875ac9565
Move ldconfig back to Dockerfile since its a noop in fakechroot
strace: execve("/bin/true", ["ldconfig"], 0x563fc29f9fa0 /* 101 vars */) = 0
2020-11-07 17:52:39 +01:00
Justin Kromlinger
0b616a629a
Always build rootfs archives before the Dockerfiles
The Dockerfiles require them for their sha256sum.
2020-11-07 16:50:03 +01:00
Justin Kromlinger
d177146b3b
Move all Dockerfile commands to Makefile
Resolves #45.
2020-11-07 16:49:07 +01:00
Sven-Hendrik Haase
80d8c5ee91
Fix incorrect name 2020-10-19 04:05:15 +02:00
Sven-Hendrik Haase
2cbbe5a720
Deduplicate a lot of code 2020-10-19 03:32:25 +02:00
Sven-Hendrik Haase
f114a6d454
Revert "Don't use xz -9 - it takes too long to no benefit"
This reverts commit 4fbd8d2d7dd4adf2cbca1a728faaa08e792f1458.
2020-10-19 01:05:18 +02:00
Sven-Hendrik Haase
4fbd8d2d7d
Don't use xz -9 - it takes too long to no benefit 2020-10-18 03:24:15 +02:00
Kristian Klausen
9b52d5674a Generate and verify checksum for the rootfs 2020-10-13 16:11:15 +02:00
Sven-Hendrik Haase
d51a887efb
Add base-devel tag 2020-08-31 18:20:52 +02:00
Justin Kromlinger
0fa3f77f16
Add GitLabCI definition
Additionally drops the GitHub and Travis CI definitions since they are no longer
needed.
2020-07-30 18:02:58 +02:00
Justin Kromlinger
cbaf17832e
Add the ability to adjust the thread count of xz, drop -e
`xz --extreme` would only save us about 1MB but take ~50% longer.
2020-07-30 17:55:36 +02:00
Justin Kromlinger
fa1ed71419
Merge remote-tracking branch 'origin/no-root-build' into github/fork/TheLinuxNinja/dockerfile-typo 2020-07-30 17:47:49 +02:00
Santiago Torres
9091d1ebb9
Makefile: add archlinux.tar target, force xz 2019-11-26 17:02:56 -05:00
Santiago Torres
4ebfbe5883
packages: add base group 2019-11-26 16:02:21 -05:00
Eli Schwartz
2fc6d9f3ee
pacstrap: usie NoExtract to prune dead weight
A docker container does not need tons of locales in order to do its job,
nor does it need extensive (or any) documentation.

With this change, a bare pacstrapped directory drops from 500MB to 390MB
2019-11-25 14:42:44 -05:00
Santiago Torres
368a504fa3
Makefile: use fakeroot for tar-ing rootfs
When tar-ing the rootfs, the permissions preserved are from the worker
process. This is not the intended behavior, as we want to preserve the
permissions of the root user to most of the files. Use fakeroot during
the tar process to automagically map the uid of the user to that of
root's.

Fixes #22

Signed-off-by: Santiago Torres <santiago@archlinux.org>
2019-10-23 20:24:42 -04:00
Santiago Torres
a2b08c5fc1
Makefile:compress:use the existing archlinux.tar
The requirements for the compress rule used to rebuild the rootfs
regardless. Update the requirement to use the existing archlinux archive
for compression
2019-10-06 12:32:39 -04:00
Santiago Torres
19fb8aeb46
Makefile: add fix for CVE-2019-5021
The previous instances of the docker image allowed for passwordless root
login. Update the default shadow setting so the root account to disallow
this.
2019-10-06 12:31:21 -04:00
Linux Ninja
eaa38cb44e add xz params to tighten archive size (saves 5M currently), use all available CPU cores, overwrite existing file
Signed-off-by: Linux Ninja <linuxninja@bryangay.com>
2019-08-10 03:16:54 -04:00
Linux Ninja
b2e07647e9 add fakechroot dependency in README.md, prevent 'already exists' error when running ln -s by adding -f in Makefile, combine two layers of Dockerfile and fix typo of pugring.gpg~
Signed-off-by: Linux Ninja <linuxninja@bryangay.com>
2019-08-10 02:57:40 -04:00
Santiago Torres
b274212ca5
Merge branch 'master' into no-root-build 2019-06-25 19:47:49 -04:00
Santiago Torres
8ec2549c3e
Dockerfile,Makefile: use a compressed tarball
When building the image for publishing in the infrastructure, we need a
rootfs that's <100MB, due to github filesize restrictions (this, plus
the fact that there's no git-lfs support for building in the docker
library toolchain). Compress the rootfs image so that it can be
hosted on github.
2019-06-25 19:21:44 -04:00
Santiago Torres
ebcde63f6c
FIX:Dockerfile/Makefile: fix ci-test requirements
The old Dockerfile and Makefile pair didn't meet the requirements of the
ci-test. Namely, the (very sensible )requirement of not shipping a
private key was missing, the sysusers hook wasn't executed properly and
the /var/cache/pacman/pkg folder was remoed (and it's specified in the
pacman MTREE package)
2018-06-04 14:04:27 -04:00
Santiago Torres
f65025bafe
FIX:fix docker build commands
I commited the wrong Dockerfile.
2018-06-04 13:17:30 -04:00
Santiago Torres
602cda864e
FIX: add fakeroot and fakechroot deps for ci-test 2018-06-04 12:43:19 -04:00
Christian Rebischke
b040116481
removed fakechroot again 2018-06-04 17:25:51 +02:00
Christian Rebischke
5e9c8ffad0
added fakechroot as dependency for ci-test 2018-06-04 17:21:38 +02:00
Santiago Torres
6f95231859
FIX:Makefile: add PWD environment variable
The previous makefile assumed that PWD was populated. This doesn't
happen in certain cases (e.g., when running as a systemd unit). Make
sure we have the PWD variable set before running any target.
2018-06-03 21:38:45 -04:00
Santiago Torres
0afc2ce276
ENH: update root-less build
This commit adds:

- Systemd sysusers hook is ran on the dockerfile
- The dockerfile also populates the archlinux keyring
- Remove the libalpm hooks as they are uneccessary now
- Moved the package cleanup before the tar step on the makefile
2018-04-17 20:05:57 -04:00
Santiago Torres
6b583c70e7
WIP: Makefile: allow for rootless build 2018-03-27 00:48:01 -04:00
Santiago Torres
0535b255ae
ENH: makefile/Dockerfile: allow for non-root build
The old makefile required commands to be run as a superuser, which
may become problematic when deploying on the archlinux infrastructure.
Use fakeroot and regular pacman commands to allow for to bootstrap a
rootfs.
2018-03-23 20:55:32 -04:00
Pierre Schmitz
eec02f2ea9 Only push the current image 2018-03-01 16:39:55 +01:00
Pierre Schmitz
53f5937db4 GH-4: Set default locale to en_US.UTF-8 2017-12-30 18:39:02 +01:00
Pierre Schmitz
73077cd828 Clean environment variables for pacstrap 2017-12-30 17:53:08 +01:00
Pierre Schmitz
9ebd50e553 Add systemd to create system users 2017-12-30 14:25:36 +01:00
Pierre Schmitz
592e77d843 Move image to archlinux organization on dockerhub 2017-05-26 09:57:51 +02:00
Pierre Schmitz
aa8caba05a Use /run and not the symlink /var/run 2017-04-23 20:09:29 +02:00