-
-
Save davetron5000/0138dadc84ec4d5772f231f5dd9b0b7e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | |
. ${SCRIPT_DIR}/setupkit.sh.lib | |
. ${SCRIPT_DIR}/dx.sh.lib | |
usage_on_help "Builds the Docker image based on the Dockerfile" "" ${@} | |
ensure_docker_compose_env | |
# CODE=$(realpath ${SCRIPT_DIR}/../../dcsidekiq/Book/code/) | |
# DEV_ENV=$(realpath ${CODE}/dev-environment/) | |
# SNAPSHOTS=$(realpath ${CODE}/snapshots/0-0/) | |
# log "๐" "Re-syncing dev-environment to ${DEV_ENV}" | |
# mkdir -p ${DEV_ENV} | |
# rsync -l --exclude='/sidekiq-book/node_modules' --exclude='/sidekiq-book/tmp' --exclude='/sidekiq-book/.git' --exclude='/.git' --exclude='/.gitignore' --exclude='/sidekiq-book/log' --delete -r . ${DEV_ENV} | |
# | |
# log "๐" "Re-syncing base snapshot to ${SNAPSHOTS}" | |
# mkdir -p ${SNAPSHOTS} | |
# rm -rf ${SNAPSHOTS}/sidekiq-book | |
# rsync -l --exclude='/sidekiq-book/node_modules' --exclude='/sidekiq-book/tmp' --exclude='/sidekiq-book/.git' --exclude='/sidekiq-book/log' --delete -r sidekiq-book ${SNAPSHOTS} | |
log "๐ณ" "Building Docker image from Dockerfile.dx" | |
docker build -f Dockerfile.dx -t $IMAGE ./ | |
log "๐" "Your Docker image has been built tagged '${IMAGE}'" | |
log "๐" "You can now run dx/start to start it up, though you may need to stop it first with Ctrl-C" | |
# vim: ft=bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment