Skip to content

Instantly share code, notes, and snippets.

@hrshadhin
Created February 14, 2018 05:39
Show Gist options
  • Save hrshadhin/84364d156a89dd0108f5cbde5b737b69 to your computer and use it in GitHub Desktop.
Save hrshadhin/84364d156a89dd0108f5cbde5b737b69 to your computer and use it in GitHub Desktop.
##Access docker vm in mac
screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty
##Expose new port in existing container
1. stop the container
2. then got to /var/lib/docker/containers/<your_container_has>/
3. Now open HostConfig.js file an change networking-settings
4. open Config2.json and change expose ports
5. Re-start the docker daemon
6. start your container
:) its working....
##Run container in infinite loop for keep alive
docker run -d -p 8080:80 --name devLinux ubuntu:16.04 /bin/bash -c "while true; do echo hello world; sleep 1; done"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment