Last active
January 7, 2019 21:39
-
-
Save baamenabar/2b0b77507d6eee40ea733c38a3ed72a7 to your computer and use it in GitHub Desktop.
Don't forget how to build and start Flyimg in windows 10 home environment with Cmder (conEmu)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Windows only: Don't forget how to build and start Flyimg in windows 10 home environment with Cmder (conEmu) | |
# Must have virtualbox installed, ideally through docker toolbox | |
# do this only once | |
docker-machine create --driver virtualbox default | |
# all the subsequent times, only this | |
docker-machine start default | |
# hook the virtual env to docker | |
docker-machine env default | |
#then cd into flyimg folder | |
cd ~/projects/flyimg | |
# check if the container image exists | |
docker image ls | |
# otherwise build the container basd on the Dockerfile from this directory | |
docker build -t flyimg . | |
# if there is an image to use, check if a container is not already created. | |
docker ps -a | |
# if there is no container start running one and mount the current folder (very careful with the folder path syntax in windows) | |
docker run -itd -p 8080:80 -v /c/Users/agust/projects/flyimg:/var/www/html --name flyimg flyimg | |
# you can now bash into the container (if you want) | |
docker exec -it flyimg bash | |
# Additionaly you can alias the mounted volume folder with the following: | |
# All credit to señor senyor: https://forums.docker.com/t/how-to-share-volumes-and-or-drives-using-docker-machine-on-windows-not-beta/20170/7 | |
docker-machine stop | |
vboxmanage sharedfolder add default --name "project_name" --hostpath "<full_project_path>" --automount | |
docker-machine start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment