treebird-docker/Dockerfile.build
ICScaryThings 2c090f71df Reworked container build to allow setting instance url at runtime
I patched neko's code to use getenv() to grab instance url at startup and store
it as a global rather than static const.
2022-06-28 23:02:34 -04:00

24 lines
628 B
Docker

# Container just for building the code and debug
FROM debian:testing
ENV BUILD_REQ="build-essential libcurl4-gnutls-dev libcjson-dev libpcre3-dev libfcgi-dev git pkgconf libpcre2-dev"
RUN apt update && apt upgrade -y
RUN apt install -y $BUILD_REQ fcgiwrap
WORKDIR /usr/local/src/treebird
# original source
COPY treebird/ .
COPY mastodont-c ./mastodont-c
COPY treebird/config.def.h ./config.h
# patch or override files
COPY files/ .
RUN patch -p1 < instance_env_config.h.patch && patch -p1 < instance_env_main.c.patch
RUN make && make install
# defined only for debugging reasons
CMD fcgiwrap -c 10 -f -s tcp:0.0.0.0:4008