-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathWindows-Docker-Container
42 lines (27 loc) · 1.95 KB
/
Windows-Docker-Container
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# https://github.com/docker/for-win/issues/1588
# https://github.com/vercel/hyper/issues/2888
######################################################
winpty docker.exe run -it --rm ubuntu:14.04 /bin/bash
######################################################
# On git bash just type:
#########################################
alias docker="winpty docker"
##########################################
and tty will work
after starting the docker I mean when it will run
do a docker login from PowerShell (git-bash )and then use git-bash
then create docker conatainer
docker container run -it -p 80:80 nginx
## Volume Mount
# https://github.com/docker/for-win/issues/3885
docker run --name amazonlinux -v c:/Users/Muhammad\ Asim/Desktop/vpc:/root -id amazonlinux
########################################################### DOCKER #######################################################
# https://tomgregory.com/running-docker-in-docker-on-windows/
# Docker in Docker
docker run --name gcp --group-add 0 -v "/var/run/docker.sock:/var/run/docker.sock" -id google/cloud-sdk:latest ---> run in Poweshell (Admin)
########################################################## VSCODE/ALL Editors in the World/All OS of the worls) #############################################
docker run --name ubuntu --group-add 0 -v "/var/run/docker.sock:/var/run/docker.sock" -v "c:/Users/Muhammad Asim/Desktop/ubuntu:/root" -id ubuntu:latest
docker run --name centos --group-add 0 -v "/var/run/docker.sock:/var/run/docker.sock" -v "c:/Users/Muhammad Asim/Desktop/centos:/root" -id centos:latest
docker run --name amazonlinux --group-add 0 -v "/var/run/docker.sock:/var/run/docker.sock" -v "c:/Users/Muhammad Asim/Desktop/amazonlinux:/root" -id amazonlinux:latest
docker run --name nginx --group-add 0 -v "/var/run/docker.sock:/var/run/docker.sock" -v "c:/Users/Muhammad Asim/Desktop/nginx:/usr/share/nginx/html" -p 80:80 -id nginx:latest
Note: docker not found inside container simply install it