Skip to content

yeka/test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Test

This is my testing ground. It uses docker heavily for ease of setup.

Contents

Docker Tricks

1. Accessing Container via IP Address

When using docker, the common usage is to use port forwarding via -p option. Accessing containers via it's IP address is only possible in linux. On Mac and Windows, docker container runs inside a some kind of virtual box.

To access container via IP on Mac, one can utilize sshuttle which require to run an ssh-server container.

docker run --rm --name sshdocker -p 2222:22 -d rastasheep/ubuntu-sshd:14.04
sshuttle -r [email protected]:2222 -N 172.17.0.0/24

Normally, container's IP is on 172.17.0.*. You can check it using docker container inspect [container_name] | grep IPAddress The default root password for rastasheep/ubuntu-sshd:14.04 is root.

Note: I haven't been able to run sshuttle against alpine-based ssh server. That's why ubuntu-based sshd is used.