Is it possible to use Docker Toolbox on Visual Studio Code?

3.3k views Asked by At

I have Windows 10 Home edition, therefore I had to install Docker Toolbox instead of Docker. I am using Visual Studio Code for development and it has extension for Docker Support (https://github.com/Microsoft/vscode-docker) which adds integration for the most common Docker commands.

Unfortunately it does not work in my case (output from Visual Studio Code terminal):

C:\Users\Konrad\workspace\docker-tests>docker build . -t docker-whale
An error occurred trying to connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/build?buildargs=%7B%7D&cgr
oupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory
=0&memswap=0&rm=1&shmsize=0&t=docker-whale&ulimits=null: open //./pipe/docker_engine: The system cannot find the
 file specified.

The same command works just fine in Docker Quickstart Terminal.

Is it possible to configure Visual Studio Code to use docker in the same way as "Docker Quickstart Terminal" does? I should change some system configuration to be able to use it?

2

There are 2 answers

0
JLLR On BEST ANSWER

I ran through the same issue. Following this article I was able to use Yeoman to configure a dotnet core container and then when you hit F5, VS Code generates the image for your app within the docker container.

0
gavioto On

Another solution if you have Docker Toolbox in your machine.

Use VSCode Remote Container development. You can find more information here: How to use vscode remote containers with Docker Toolbox (Windows 7)?