treebird-docker/build_container.sh

16 lines
447 B
Bash
Executable file

#!/bin/sh
# Build the container image and perfom additional steps
IMAGE_NAME=${1:-treebird:latest}
CONTAINER_NAME=${2:-treebird}
RESOURCES_SRC=/usr/local/share/treebird/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
cp -r ${RESOURCES_DST} nginx-test/