Commit 005e032e authored by hashworks's avatar hashworks
Browse files

Merge branch 'github/fork/TheLinuxNinja/dockerfile-typo' into 'no-root-build'

a handful of fixes and improvements found while testing this branch

See merge request archlinux/archlinux-docker!16
parents 9bd11c95 cbaf1783
...@@ -8,9 +8,8 @@ RUN sh -c 'ls usr/lib/sysusers.d/*.conf | /usr/share/libalpm/scripts/systemd-hoo ...@@ -8,9 +8,8 @@ RUN sh -c 'ls usr/lib/sysusers.d/*.conf | /usr/share/libalpm/scripts/systemd-hoo
# update /etc/os-release # update /etc/os-release
RUN ln -s /usr/lib/os-release /etc/os-release RUN ln -s /usr/lib/os-release /etc/os-release
# initialize the archilnux keyring, but discard any private key that may be shipped. # initialize the archlinux keyring, but discard any private key that may be shipped.
RUN pacman-key --init && pacman-key --populate archlinux RUN pacman-key --init && pacman-key --populate archlinux && rm -rf etc/pacman.d/gnupg/{openpgp-revocs.d/,private-keys-v1.d/,pubring.gpg~,gnupg.S.}*
RUN rm -rf etc/pacman.d/gnupg/{openpgp-revocs.d/,private-keys-v1.d/,pugring.gpg~,gnupg.S.}*
ENV LANG=en_US.UTF-8 ENV LANG=en_US.UTF-8
CMD ["/usr/bin/bash"] CMD ["/usr/bin/bash"]
...@@ -4,9 +4,11 @@ DOCKER_IMAGE:=base ...@@ -4,9 +4,11 @@ DOCKER_IMAGE:=base
BUILDDIR=build BUILDDIR=build
PWD=$(shell pwd) PWD=$(shell pwd)
XZ_THREADS ?= 0
hooks: hooks:
mkdir -p alpm-hooks/usr/share/libalpm/hooks mkdir -p alpm-hooks/usr/share/libalpm/hooks
find /usr/share/libalpm/hooks -exec ln -s /dev/null $(PWD)/alpm-hooks{} \; find /usr/share/libalpm/hooks -exec ln -sf /dev/null $(PWD)/alpm-hooks{} \;
rootfs: hooks rootfs: hooks
mkdir -vp $(BUILDDIR)/var/lib/pacman/ mkdir -vp $(BUILDDIR)/var/lib/pacman/
...@@ -30,7 +32,7 @@ rootfs: hooks ...@@ -30,7 +32,7 @@ rootfs: hooks
archlinux.tar: rootfs archlinux.tar: rootfs
compress-rootfs: archlinux.tar compress-rootfs: archlinux.tar
xz -f archlinux.tar xz -9 -T"$(XZ_THREADS)" -f archlinux.tar
docker-image: compress-rootfs docker-image: compress-rootfs
docker build -t $(DOCKER_ORGANIZATION)/$(DOCKER_IMAGE) . docker build -t $(DOCKER_ORGANIZATION)/$(DOCKER_IMAGE) .
......
...@@ -5,6 +5,8 @@ Install the following Arch Linux packages: ...@@ -5,6 +5,8 @@ Install the following Arch Linux packages:
* make * make
* devtools * devtools
* docker * docker
* fakechroot
* fakeroot
## Usage ## Usage
Run `make docker-image` as root to build the base image. Run `make docker-image` as root to build the base image.
## Purpose ## Purpose
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment