44 Commits

Author SHA1 Message Date
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
Pierre Schmitz
a4aeaa2eb2 Use image variable for test as well 2017-04-23 16:48:06 +02:00
Pierre Schmitz
5f4ad22705 Mount /run/shm to allow build on Ubuntu 2017-04-23 16:38:24 +02:00
Pierre Schmitz
b29d8f224c Use tmpfs 2017-04-23 16:03:22 +02:00
Pierre Schmitz
8e7540ea9b Update the image before building a new one 2017-04-23 15:41:45 +02:00
Pierre Schmitz
20739c17b4 Add self test that can be run by travis 2017-04-23 15:36:09 +02:00
Pierre Schmitz
4aa93742cb Ensure that the image does not include a private key 2017-04-23 15:11:34 +02:00
Pierre Schmitz
9a19fbb335 Fix permissions and add basic image test 2017-04-15 21:14:45 +02:00
Pierre Schmitz
fd90632ef2 Add task to push local image 2017-04-10 17:26:33 +02:00
Pierre Schmitz
4a03bbb541 Use pacman.conf from devtools 2017-04-10 17:26:33 +02:00
Pierre Schmitz
f5bf444d43 Add initial implementation 2017-04-08 18:10:19 +02:00