add README and build scripts
This commit is contained in:
18
scripts/build-container.sh
Normal file
18
scripts/build-container.sh
Normal file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
IMAGE=${IMAGE:-demo-server:$(date +%F)}
|
||||
|
||||
SCRIPTDIR=$(dirname $0)
|
||||
BASEDIR=$(dirname $SCRIPTDIR)
|
||||
|
||||
ARGS=()
|
||||
|
||||
if [ ! -z "$APK_MIRROR" ]; then
|
||||
ARGS+=(--build-args APK_MIRROR=${APK_MIRROR})
|
||||
fi
|
||||
|
||||
if [ ! -z "$CRATES_MIRROR" ]; then
|
||||
ARGS+=(--build-args CRATES_MIRROR=${CRATES_MIRROR})
|
||||
fi
|
||||
|
||||
docker build -t $IMAGE -f ${BASEDIR}/build/Dockerfile "${ARGS[@]}" ${BASEDIR}
|
Reference in New Issue
Block a user