feat: dockerfile for archlinux

This commit is contained in:
Marcus Holland-Moritz 2024-04-01 21:16:06 +02:00
parent b3bdf94fc2
commit 5719a8a0a8
2 changed files with 61 additions and 0 deletions

47
.docker/Dockerfile.arch Normal file
View File

@ -0,0 +1,47 @@
# syntax=docker/dockerfile:1
FROM archlinux/archlinux:latest
RUN pacman -Syu --noconfirm
RUN pacman -S --noconfirm \
bash-completion \
vim \
devtools \
less
RUN pacman -S --noconfirm --needed \
gcc \
clang \
man \
git \
zstd \
ccache \
ninja \
cmake \
make \
bison \
flex \
ruby-ronn \
python-mistletoe \
fuse \
fuse3 \
pkg-config \
binutils \
libarchive \
benchmark \
boost \
brotli \
libevent \
openssl \
fmt \
chrono-date \
range-v3 \
jemalloc \
double-conversion \
lz4 \
xz \
libunwind \
libdwarf \
google-glog \
flac \
utf8cpp
RUN useradd -g users -u 1000 -m mhx
USER mhx
ENTRYPOINT /bin/bash

View File

@ -1,5 +1,6 @@
IMAGE="dwarfs-buildenv"
IMAGE_FEDORA="dwarfs-buildenv-fedora"
IMAGE_ARCH="dwarfs-buildenv-arch"
ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
NPROC:=$(shell nproc)
@ -32,3 +33,16 @@ run_fedora:
--mount type=bind,source="$(ROOT_DIR)"/../@docker-build,target=/home/mhx/build \
--env CCACHE_DIR=/ccache --env CTEST_PARALLEL_LEVEL=$(NPROC) \
--entrypoint /bin/bash $(IMAGE_FEDORA)
build_arch:
docker build -f Dockerfile.arch -t $(IMAGE_ARCH) .
run_arch:
@docker run -it --rm \
--cap-add SYS_ADMIN --device /dev/fuse --privileged \
--mount type=bind,source="$(ROOT_DIR)"/..,target=/workspace,readonly \
--mount type=bind,source="$(ROOT_DIR)"/../@docker-ccache,target=/ccache \
--mount type=bind,source="$(ROOT_DIR)"/../@docker-home,target=/home/mhx \
--mount type=bind,source="$(ROOT_DIR)"/../@docker-build,target=/home/mhx/build \
--env CCACHE_DIR=/ccache --env CTEST_PARALLEL_LEVEL=$(NPROC) \
--entrypoint /bin/bash $(IMAGE_ARCH)