Skip to content

Commit

Permalink
chore: Update Dockerfile to build a smaller final image with Alpine L…
Browse files Browse the repository at this point in the history
…inux and set GIN_MODE to release
  • Loading branch information
nilgaar committed Jul 13, 2024
1 parent f0c3ff4 commit 3e24881
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions backend/run_backend.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
#! /bin/bash
docker build -t go-app .
docker run -p 8080:8080 go-app
#!/bin/bash

# Name of your Docker application
APP_NAME="go-app"

# Stop the currently running container
docker stop $APP_NAME

# Remove the stopped container
docker rm $APP_NAME

# Build the new Docker image
docker build -t $APP_NAME .

# Run the new Docker container
docker run -d --name $APP_NAME -p 8080:8080 $APP_NAME

0 comments on commit 3e24881

Please sign in to comment.