Skip to content

Commit 6bcddd1

Browse files
committed
Do not use a variable for app port, because the port is hardcoded in the Golang code
1 parent 6b5e66a commit 6bcddd1

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

.env

-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,3 @@ PROJECT_VERSION="1.0.0-alpha"
1414
# Docker-related settings
1515
DOCKER_IMAGE_NAME="miguno/golang-docker-build-tutorial"
1616
DOCKER_IMAGE_TAG="latest"
17-
DOCKER_APP_PORT="8123"

start_container.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ set -uo pipefail
88
# Import environment variables from .env
99
set -o allexport && source .env && set +o allexport
1010

11-
echo "Starting container for image '$DOCKER_IMAGE_NAME:$DOCKER_IMAGE_TAG', exposing port $DOCKER_APP_PORT/tcp"
12-
docker run -p "$DOCKER_APP_PORT":"$DOCKER_APP_PORT" "$DOCKER_IMAGE_NAME":"$DOCKER_IMAGE_TAG"
11+
echo "Starting container for image '$DOCKER_IMAGE_NAME:$DOCKER_IMAGE_TAG', exposing port 8123/tcp"
12+
docker run -p 8123:8123 "$DOCKER_IMAGE_NAME":"$DOCKER_IMAGE_TAG"
1313

0 commit comments

Comments
 (0)