Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

Commit

Permalink
use correct image
Browse files Browse the repository at this point in the history
  • Loading branch information
richfitz committed Oct 20, 2023
1 parent 383e4bc commit ad541bd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/privateer2/tar.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from privateer2.check import check
from privateer2.config import find_source
from privateer2.util import (
ensure_image,
isotimestamp,
mounts_str,
run_docker_command,
Expand Down Expand Up @@ -101,7 +102,9 @@ def import_tar(volume, tarfile, *, dry_run=False):
msg = f"Input file '{tarfile}' does not exist"
raise Exception(msg)

image = "alpine"
# Use our image (not alpine) because we will require the -p tag to
# preserve permissions on tar
image = f"mrcide/privateer-client:{cfg.tag}"
tarfile = os.path.abspath(tarfile)
mounts = [
docker.types.Mount("/src.tar", tarfile, type="bind", read_only=True),
Expand All @@ -125,6 +128,7 @@ def import_tar(volume, tarfile, *, dry_run=False):
print(f" docker volume create {volume}")
print(f" {' '.join(cmd)}")
else:
ensure_image(image)
docker.from_env().volumes.create(volume)
run_docker_command(
"Import",
Expand Down

0 comments on commit ad541bd

Please sign in to comment.