Skip to content

Commit

Permalink
Replace unzip with bsdtar
Browse files Browse the repository at this point in the history
There are situations where a Zip archive from Sourcegraph causes the
directory to be improperly recreated within the container. Using
libarchive-tools fixes this.
  • Loading branch information
lowjoel committed Aug 17, 2023
1 parent b9e783a commit 0334ed9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docker/batch-change-volume-workspace/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

FROM alpine:3.15.0@sha256:21a3deaa0d32a8057914f36584b5288d2e5ecc984380bc0118285c70fa8c9300

RUN apk add --update git unzip
RUN apk add --update git libarchive-tools
2 changes: 1 addition & 1 deletion internal/batches/workspace/volume_workspace.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func (wc *dockerVolumeWorkspaceCreator) unzipRepoIntoVolume(ctx context.Context,
opts,
DockerVolumeWorkspaceImage,
"sh", "-c",
fmt.Sprintf("unzip /tmp/zip; rm /work/%s", dummy),
fmt.Sprintf("bsdtar -xf /tmp/zip && rm /work/%s", dummy),
)

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

0 comments on commit 0334ed9

Please sign in to comment.