1

I am getting below error in powershell while executing docker-compose command: enter image description here

While same command is working fine from Docker Quickstart Terminal: enter image description here

1 Answer 1

3

Make sure you have set the right environment variables in your Powershell session first.

See docker-machine env:

$ docker-machine.exe env --shell powershell dev
$Env:DOCKER_TLS_VERIFY = "1"
$Env:DOCKER_HOST = "tcp://192.168.99.101:2376"
$Env:DOCKER_CERT_PATH = "C:\Users\captain\.docker\machine\machines\dev"
$Env:DOCKER_MACHINE_NAME = "dev"
# Run this command to configure your shell:
# docker-machine.exe env --shell=powershell dev | Invoke-Expression

Replace 'dev' by the name of your machine.

Sign up to request clarification or add additional context in comments.

4 Comments

I am aware of it but was blocked by stackoverflow to accept it sooner :). done it now
@GauravGupta no problem. Thank you
One more thing, this command is session specific. Is it possible to somehow make it permanent?
@GauravGupta Sure, put those command in a bashrc-like for your powershell: see superuser.com/a/1045659/141. This powershell profiles are scripts which are executed when you start a shell.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.