Skip to content

Commit

Permalink
chore: added docker tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
henrywhitaker3 committed Apr 19, 2024
1 parent 0f7cce5 commit d9016a5
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,27 @@ tasks:
desc: Run the http server
cmds:
- go run main.go serve

docker:build:
desc: Build the docker image
requires:
vars:
- tag
cmds:
- docker build . -t henrywhitaker3/prompage:{{ .tag }}

docker:run:
desc: Build and run the docker image
vars:
tag:
sh: head -n 10 /dev/random | md5sum | cut -c1-6
cmds:
- task: docker:build
vars:
tag: '{{ .tag }}'
- docker run --net=host --rm -v $(pwd)/prompage.yaml:/prompage.yaml henrywhitaker3/prompage:{{ .tag }} {{ .CLI_ARGS }}

default:
silent: true
cmds:
- task -l

0 comments on commit d9016a5

Please sign in to comment.