Skip to content

Commit 0334ed9

Browse files
committed
Replace unzip with bsdtar
There are situations where a Zip archive from Sourcegraph causes the directory to be improperly recreated within the container. Using libarchive-tools fixes this.
1 parent b9e783a commit 0334ed9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎docker/batch-change-volume-workspace/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44

55
FROM alpine:3.15.0@sha256:21a3deaa0d32a8057914f36584b5288d2e5ecc984380bc0118285c70fa8c9300
66

7-
RUN apk add --update git unzip
7+
RUN apk add --update git libarchive-tools

‎internal/batches/workspace/volume_workspace.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ func (wc *dockerVolumeWorkspaceCreator) unzipRepoIntoVolume(ctx context.Context,
153153
opts,
154154
DockerVolumeWorkspaceImage,
155155
"sh", "-c",
156-
fmt.Sprintf("unzip /tmp/zip; rm /work/%s", dummy),
156+
fmt.Sprintf("bsdtar -xf /tmp/zip && rm /work/%s", dummy),
157157
)
158158

159159
if out, err := exec.CommandContext(ctx, "docker", opts...).CombinedOutput(); err != nil {

0 commit comments

Comments
 (0)