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

Running on docker without custom proxy #191

Open
kendarorg opened this issue Oct 26, 2023 · 1 comment
Open

Running on docker without custom proxy #191

kendarorg opened this issue Oct 26, 2023 · 1 comment

Comments

@kendarorg
Copy link
Owner

kendarorg commented Oct 26, 2023

docker network create [OPTIONS] NETWORK
You can also use the docker run --network= option to start a container and immediately connect it to a network
sudo docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' portainer

@kendarorg
Copy link
Owner Author

kendarorg commented Oct 30, 2023

Exciting new stuff!!

https://www.baeldung.com/ops/docker-assign-static-ip-container

sudo docker network create \
  --driver=bridge \
  --subnet=192.168.1.0/24 \
  --ip-range=192.168.1.0/25 \
  --gateway=192.168.1.127 \
  mynetwork

sudo docker run -it --net mynetwork --ip 192.168.1.128 --name testbash ubuntu bash

sudo docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' testbash 

apt-get update \
apt-get install net-tools  curl  traceroute
ifconfig
traceroute www.google.com


sudo docker run -it --net mynetwork --name doublebash  ubuntu bash
apt-get update \
apt-get install net-tools  curl  traceroute
ifconfig
traceroute www.google.com

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

When branches are created from issues, their pull requests are automatically linked.

1 participant