Introduce a local script to simplify building and pushing new versions to Docker Hub.
This commit is contained in:
parent
6f18b91088
commit
a0496dbe97
19
build_and_push.sh
Normal file
19
build_and_push.sh
Normal file
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
image="mikeah/prusaslicer-novnc"
|
||||
|
||||
# Set the timestamp
|
||||
timestamp=$(date +%Y.%m.%d.%H%M%S)
|
||||
|
||||
tag=$image:$timestamp
|
||||
latest=$image:latest
|
||||
|
||||
# Build the image -- tagged with the timestamp.
|
||||
docker build -t $tag .
|
||||
|
||||
# Push with the latest tag and the timestamp tag to Docker Hub.
|
||||
docker login
|
||||
docker push $latest
|
||||
|
||||
# Cleanup
|
||||
docker system prune -f
|
Loading…
Reference in New Issue
Block a user