Introduce a local script to simplify building and pushing new versions to Docker Hub.

This commit is contained in:
Michael Helfrich 2022-02-07 20:05:47 -05:00
parent 6f18b91088
commit a0496dbe97

19
build_and_push.sh Normal file
View 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