Skip to content

batches: fix Docker Desktop for Linux handling#813

Merged
LawnGnome merged 1 commit into
mainfrom
aharvey/fix-docker-desktop-for-linux
Aug 10, 2022
Merged

batches: fix Docker Desktop for Linux handling#813
LawnGnome merged 1 commit into
mainfrom
aharvey/fix-docker-desktop-for-linux

Conversation

@LawnGnome

Copy link
Copy Markdown
Contributor

If the default temporary directory is in use and Docker Desktop for Linux is the default Docker context, this changes the temporary directory to be one under ~/.cache/sourcegraph/batch-tmp instead.

Fixes #754.

Test plan

Tested manually in both workspace modes.

If the default temporary directory is in use _and_ Docker Desktop for
Linux is the default Docker context, this changes the temporary
directory to be one under `~/.cache/sourcegraph/batch-tmp` instead.

Fixes #754.
@LawnGnome LawnGnome requested a review from a team August 10, 2022 05:23

@eseliger eseliger left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@courier-new courier-new left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm so glad you have an actual linux box to test this on. Thanks for all the comments for future context, too!

}
defer cancel()

args := []string{"context", "inspect", "--format", "{{ .Name }}"}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, it makes me happy that this is so straightforward to get from Docker! 😄

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspected the hardest part of this ticket was going to be detecting this case, so this was a very pleasant surprise.

@LawnGnome LawnGnome merged commit b86c397 into main Aug 10, 2022
@LawnGnome LawnGnome deleted the aharvey/fix-docker-desktop-for-linux branch August 10, 2022 15:36
scjohns pushed a commit that referenced this pull request Apr 24, 2023
If the default temporary directory is in use _and_ Docker Desktop for
Linux is the default Docker context, this changes the temporary
directory to be one under `~/.cache/sourcegraph/batch-tmp` instead.

Fixes #754.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

batches: Docker Desktop for Linux: Invalid mount config for type "bind"

4 participants