Skip to content

Lauch Dockerd when opening a Gitpod Workspace on this Repo #2363

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ tasks:
- name: Go
init: leeway exec --filter-type go -v -- go get -v ./...
openMode: split-right
- name: Docker
command: |
if [ -x "$(which docker-up)" ]
Copy link
Contributor

@csweichel csweichel Dec 2, 2020

Choose a reason for hiding this comment

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

I had a bit more of a think about this. While it's true that docker-up is only in the path if feature preview is enabled, that's because feature preview also enables registry-facade. Hence which docker-up is more of a signal for registry facade rather than user namespaces.
Also, in gitpod-io it's likely to have docker-up in the path even without registry-facade due to the go get ... in components/docker-up.

Instead you could check if sudo works, e.g.

if [ sudo true &>/dev/null ]; then
  sudo docker-up
else
  echo "Enable 'Feature Preview' in your Gitpod profile for Docker support."
fi

then
sudo docker-up
else
echo "Enable 'Feature Preview' in your Gitpod profile for Docker support."
fi
openMode: tab-after
vscode:
extensions:
- [email protected]:UATTe2sTFfCYWQ3jw4IRsw==
Expand Down