mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-19 01:07:00 -04:00
feat: dockerfile for archlinux
This commit is contained in:
parent
b3bdf94fc2
commit
5719a8a0a8
47
.docker/Dockerfile.arch
Normal file
47
.docker/Dockerfile.arch
Normal 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
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user