mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00
install: Use the full image tag
Use the full image tag (dangerzone.rocks/dangerzone:latest) when building the image. Else, we risk creating a `share/image-id.txt` file with multiple IDs in it, if we have another `dangerzone.rocks/dangerzone` image (with a different tag) in our dev environment.
This commit is contained in:
parent
c719fc4f54
commit
4668443be6
3 changed files with 13 additions and 9 deletions
|
@ -2,11 +2,13 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
TAG=dangerzone.rocks/dangerzone:latest
|
||||||
|
|
||||||
echo "Building container image"
|
echo "Building container image"
|
||||||
podman build container --tag dangerzone.rocks/dangerzone
|
podman build container --tag $TAG
|
||||||
|
|
||||||
echo "Saving and compressing container image"
|
echo "Saving and compressing container image"
|
||||||
podman save dangerzone.rocks/dangerzone | gzip > share/container.tar.gz
|
podman save $TAG | gzip > share/container.tar.gz
|
||||||
|
|
||||||
echo "Looking up the image id"
|
echo "Looking up the image id"
|
||||||
podman image ls dangerzone.rocks/dangerzone | grep "dangerzone.rocks/dangerzone" | tr -s ' ' | cut -d' ' -f3 > share/image-id.txt
|
podman images --filter=reference=$TAG > share/image-id.txt
|
||||||
|
|
|
@ -2,11 +2,13 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
TAG=dangerzone.rocks/dangerzone:latest
|
||||||
|
|
||||||
echo "Building container image"
|
echo "Building container image"
|
||||||
docker build container --tag dangerzone.rocks/dangerzone
|
docker build container --tag $TAG
|
||||||
|
|
||||||
echo "Saving and compressing container image"
|
echo "Saving and compressing container image"
|
||||||
docker save dangerzone.rocks/dangerzone | gzip > share/container.tar.gz
|
docker save $TAG | gzip > share/container.tar.gz
|
||||||
|
|
||||||
echo "Looking up the image id"
|
echo "Looking up the image id"
|
||||||
docker image ls dangerzone.rocks/dangerzone | grep "dangerzone.rocks/dangerzone" | tr -s ' ' | cut -d' ' -f3 > share/image-id.txt
|
docker images --filter=reference=$TAG > share/image-id.txt
|
||||||
|
|
|
@ -11,7 +11,7 @@ def main():
|
||||||
"build",
|
"build",
|
||||||
"container",
|
"container",
|
||||||
"--tag",
|
"--tag",
|
||||||
"dangerzone.rocks/dangerzone",
|
"dangerzone.rocks/dangerzone:latest",
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ def main():
|
||||||
[
|
[
|
||||||
"docker",
|
"docker",
|
||||||
"save",
|
"save",
|
||||||
"dangerzone.rocks/dangerzone",
|
"dangerzone.rocks/dangerzone:latest",
|
||||||
],
|
],
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
)
|
)
|
||||||
|
@ -45,7 +45,7 @@ def main():
|
||||||
"list",
|
"list",
|
||||||
"--format",
|
"--format",
|
||||||
"{{.ID}}",
|
"{{.ID}}",
|
||||||
"dangerzone.rocks/dangerzone",
|
"dangerzone.rocks/dangerzone:latest",
|
||||||
],
|
],
|
||||||
text=True,
|
text=True,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue