Skip to content

Commit

Permalink
fix: Devcontainer resets /etc/hosts (#11439) (#11440)
Browse files Browse the repository at this point in the history
Signed-off-by: Byeonggon Lee <binkoni@gonnux.com>
  • Loading branch information
binkoni authored Jul 27, 2023
1 parent d876464 commit f8a34a3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
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://raw.githubusercontent.com/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

0 comments on commit f8a34a3

Please sign in to comment.