Skip to content

Commit

Permalink
Replace Vagrant with Docker Compose
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosabalde committed Feb 2, 2024
1 parent 5716fe7 commit 4720ce3
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 65 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/.env

Makefile
Makefile.in
.deps/
Expand Down
61 changes: 61 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
FROM ubuntu:focal-20211006

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 \
libeditline-dev \
libjemalloc-dev \
liblua5.1-0-dev \
libluajit-5.1-dev \
libncurses-dev \
libpcre3-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-6.0.9.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"]
65 changes: 0 additions & 65 deletions Vagrantfile

This file was deleted.

34 changes: 34 additions & 0 deletions docker-compose.yml
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-6_0

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

0 comments on commit 4720ce3

Please sign in to comment.