We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1ffc18d commit c5880ddCopy full SHA for c5880dd
.github/workflows/build-and-run.yml
@@ -0,0 +1,18 @@
1
+name: Build and run docker container
2
+
3
+on:
4
+ push:
5
+ branches: ["main"]
6
+ pull_request:
7
8
9
+jobs:
10
+ build:
11
+ runs-on: self-hosted
12
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ - name: Build the Docker image
16
+ run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)
17
+ - name: Run the Docker container on port 8000
18
+ run: docker run -d -p 8000:8000 my-image-name:$(date +%s)
.github/workflows/docker-image.yml
docker-compose.yml
@@ -9,7 +9,7 @@ services:
caddy:
image: caddy:2
ports:
- - "8080:80"
+ - "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
0 commit comments