-
Notifications
You must be signed in to change notification settings - Fork 21
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
5fa4ce7
commit 2a76c6a
Showing
5 changed files
with
126 additions
and
86 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,74 @@ | ||
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 \ | ||
libedit-dev \ | ||
libev-dev \ | ||
libjemalloc-dev \ | ||
libncurses-dev \ | ||
libpcre2-dev \ | ||
libssl-dev \ | ||
libtool \ | ||
make \ | ||
nano \ | ||
netcat \ | ||
pkg-config \ | ||
python3 \ | ||
python3-docutils \ | ||
python3-sphinx \ | ||
python3-venv \ | ||
tar \ | ||
telnet \ | ||
unzip \ | ||
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 | ||
|
||
RUN cd /tmp \ | ||
&& wget --no-check-certificate https://github.com/redis/hiredis/archive/v1.2.0.zip -O hiredis-1.2.0.zip \ | ||
&& unzip hiredis-*.zip \ | ||
&& rm -f hiredis-*.zip \ | ||
&& cd hiredis* \ | ||
&& make USE_SSL=1 \ | ||
&& make USE_SSL=1 PREFIX='/usr/local' install \ | ||
&& ldconfig | ||
|
||
RUN cd /tmp \ | ||
&& wget --no-check-certificate http://download.redis.io/releases/redis-7.0.9.tar.gz \ | ||
&& tar zxvf redis-*.tar.gz \ | ||
&& rm -f redis-*.tar.gz \ | ||
&& cd redis-* \ | ||
&& make BUILD_TLS=yes \ | ||
&& make BUILD_TLS=yes 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-redis-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 |