23 lines
694 B
Bash
Executable File
23 lines
694 B
Bash
Executable File
#!/bin/bash
|
|
source "$(dirname "$0")/_common.sh"
|
|
load_env "$1" || die "Failed to load environment variables"
|
|
|
|
DOCKER_RUN_CMD="docker run -d \
|
|
--restart unless-stopped \
|
|
--name ${CONTAINER_NAME} \
|
|
-p ${HOST_PORT}:${CONTAINER_PORT} \
|
|
-v ${LOCAL_DATA_FOLDER}:/skdata \
|
|
${IMAGE_REGISTRY}/${IMAGE_REPO}:${IMAGE_TAG}"
|
|
|
|
|
|
if ! create_and_start_container "$DOCKER_RUN_CMD"; then
|
|
die "Failed to start container ${CONTAINER_NAME}"
|
|
fi
|
|
|
|
# Check if the container is running
|
|
if ! _is_container_running "$CONTAINER_NAME"; then
|
|
die "Container ${CONTAINER_NAME} is not running"
|
|
fi
|
|
|
|
echo "Container ${CONTAINER_NAME} started"
|