forked from mirrors/treebird-docker
Update docker build packages and add build script
This commit is contained in:
parent
ac5eaa7dac
commit
6a35df458a
2 changed files with 21 additions and 1 deletions
|
@ -1,9 +1,15 @@
|
|||
FROM debian:testing
|
||||
# FROM nginx # cant use this because it uses debian stable with ancient packeges
|
||||
|
||||
ENV BUILD_REQ="build-essential libcurl4-gnutls-dev libcjson-dev libpcre3-dev libfcgi-dev git pkgconf"
|
||||
ENV RUN_REQ="spawn-fcgi fcgiwrap"
|
||||
|
||||
RUN apt update && apt upgrade -y
|
||||
RUN apt install -y build-essential libcurl4-gnutls-dev libcjson-dev libpcre3-dev libfcgi-dev git pkgconf
|
||||
RUN apt install -y $BUILD_REQ $RUN_REQ
|
||||
|
||||
ENV TB_BUILD_DIR=/usr/local/src/treebird
|
||||
COPY treebird $TB_BUILD_DIR
|
||||
RUN make -C $TB_BUILD_DIR && make -C $TB_BUILD_DIR install
|
||||
|
||||
# Fix broken permissions BS
|
||||
RUN chmod a+x
|
||||
|
|
14
build_container.sh
Executable file
14
build_container.sh
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
# Build the container image and perfom additional steps
|
||||
IMAGE_NAME=${1:-treebird:latest}
|
||||
CONTAINER_NAME=${2:-treebird}
|
||||
|
||||
RESOURCES_SRC=/usr/local/share/dist
|
||||
RESOURCES_DST=./to-webserv
|
||||
|
||||
docker build -t $IMAGE_NAME .
|
||||
|
||||
# copy out the shared dist files
|
||||
docker run --rm --name $CONTAINER_NAME -d $IMAGE_NAME
|
||||
docker cp ${CONTAINER_NAME}:${RESOURCES_SRC} ${RESOURCES_DST}
|
||||
docker stop $CONTAINER_NAME
|
Loading…
Reference in a new issue