Docker Windows – Adapt docker linux commands to Windows

Objective

For testing purpose, I wanted to install Gitlab on my machine (It’s like github but on premise).

So sometimes you find docker commands for linux. It is easy to adapt it for windows docker

Example of docker linux command :

https://docs.gitlab.com/omnibus/docker/

How ?

  • Replace \ by `
  • Add ” to the last line
  • Remove sudo

Example

LINUX WINDOWS
sudo docker run –detach \

–hostname gitlab.example.com \

–publish 443:443 –publish 80:80 –publish 22:22 \

–name gitlab \

–restart always \

–volume /srv/gitlab/config:/etc/gitlab \

–volume /srv/gitlab/logs:/var/log/gitlab \

–volume /srv/gitlab/data:/var/opt/gitlab \

gitlab/gitlab-ce:latest

docker run –detach `

–hostname gitlab.example.com `

–publish 443:443 –publish 80:80 –publish 22:22 `

–name gitlab `

–restart always `

–volume /srv/gitlab/config:/etc/gitlab `

–volume /srv/gitlab/logs:/var/log/gitlab `

–volume /srv/gitlab/data:/var/opt/gitlab `

“gitlab/gitlab-ee:latest”

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a free website or blog at WordPress.com.

Up ↑

%d bloggers like this: