-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
af441f8
commit 967a843
Showing
5 changed files
with
112 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
/.env | ||
|
||
Makefile | ||
Makefile.in | ||
.deps/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
FROM ubuntu:jammy-20220428 | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
RUN groupadd -g 5000 dev \ | ||
&& useradd -u 5000 -g 5000 -m -s /bin/bash dev | ||
|
||
RUN apt update \ | ||
&& apt install -y \ | ||
apt-transport-https \ | ||
automake \ | ||
autotools-dev \ | ||
bindfs \ | ||
binutils \ | ||
curl \ | ||
dpkg-dev \ | ||
git \ | ||
gpg \ | ||
graphviz \ | ||
jq \ | ||
less \ | ||
libcurl4-gnutls-dev \ | ||
libedit-dev \ | ||
libjemalloc-dev \ | ||
liblua5.1-0-dev \ | ||
libluajit-5.1-dev \ | ||
libncurses-dev \ | ||
libpcre2-dev \ | ||
libtool \ | ||
lua5.1 \ | ||
luajit \ | ||
make \ | ||
nano \ | ||
netcat \ | ||
pkg-config \ | ||
python3 \ | ||
python3-docutils \ | ||
python3-sphinx \ | ||
python3-venv \ | ||
tar \ | ||
telnet \ | ||
unzip \ | ||
vim-common \ | ||
wget \ | ||
&& apt clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN cd /tmp \ | ||
&& wget --no-check-certificate https://varnish-cache.org/_downloads/varnish-7.4.0.tgz \ | ||
&& tar zxvf varnish-*.tgz \ | ||
&& rm -f varnish-*.tgz \ | ||
&& cd varnish-* \ | ||
&& ./autogen.sh \ | ||
&& ./configure \ | ||
&& make \ | ||
&& make PREFIX='/usr/local' install \ | ||
&& ldconfig | ||
|
||
COPY ./docker-entrypoint.sh / | ||
ENTRYPOINT ["/docker-entrypoint.sh"] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
|
||
# | ||
# Cheat sheet: | ||
# $ echo -e "UID=$(id -u)\nGID=$(id -g)" > .env | ||
# $ docker compose up --build --detach | ||
# $ docker compose exec --user dev --workdir /mnt/host dev bash | ||
# $ ./autogen.sh | ||
# $ ./configure | ||
# $ make | ||
# $ make check | ||
# $ docker compose down --volumes --remove-orphans | ||
# | ||
|
||
version: '3.7' | ||
|
||
name: libvmod-cfg-7_4 | ||
|
||
services: | ||
dev: | ||
hostname: dev | ||
build: | ||
context: . | ||
privileged: true | ||
environment: | ||
HOST_UID: ${UID:?} | ||
HOST_GID: ${GID:?} | ||
volumes: | ||
- .:/mnt/host.raw | ||
tmpfs: | ||
- /run | ||
- /run/lock | ||
- /var/cache | ||
- /tmp:exec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env bash | ||
|
||
mkdir -p /mnt/host | ||
|
||
# Beware 'privileged: true' is required for this. | ||
bindfs \ | ||
--force-user=$(id -u dev) \ | ||
--force-group=$(id -g dev) \ | ||
--create-for-user=$HOST_UID \ | ||
--create-for-group=$HOST_GID \ | ||
--chown-ignore \ | ||
--chgrp-ignore \ | ||
/mnt/host.raw \ | ||
/mnt/host | ||
|
||
tail -f /dev/null |