Running docker command in azure docker VM

I’m a trying to setup a docker enabled linux VM on azure. I have a VM created with the docker extension by using azure cross platform command line tool. however i have 2 issues right now

  1. When I ssh into the VM and try to run the docker command (ex docker images), it returns the following error.

FATA[0000] Get http:///var/run/docker.sock/v1.18/images/json: dial unix /var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS?

  • what are the different between LXD,LXC and User mode linux?
  • Docker install memcached
  • Why should I use ribbon/hystrix/eureka instead of docker+haproxy for a microservice?
  • Terraform unable to get docker to join swarm
  • Within docker container can we get the host ip and the random ports allotted
  • Unable to access the webapplication through container IP in service fabric cluster VM
    1. I am only able to run the docker command against the vm remotely (docker --tls images …something like this). According to their documentation the “azure create docker vm” command will create the certificate for the server to use. How do I connect from a remote on a different machine? where can I find the generated certificate and how to use it for remote access?

  • How to set docker container time in Docker for Windows
  • Configuring application in docker container to access other containers
  • Dockerizing an app
  • cannot build docker image
  • Is it possible to start a shell session in a running container (without ssh)
  • DNS Swarm agent not working on Azure
  • One Solution collect form web for “Running docker command in azure docker VM”

    Once the software is installed, you can start using it. However, you may encounter the following two issues the first time you attempt to run docker commands:

    docker
    FATA[0000] Get http: ///var/run/docker.sock/v1.18/images/json: dial unix /var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS?

    And the other error is:

    docker
    FATA[0000] Get http: ///var/run/docker.sock/v1.18/containers/json: dial unix /var/run/docker.sock: permission denied. Are you trying to connect to a TLS-enabled daemon without TLS?

    The reason is, you need to start the Docker service first. Moreover, you must run the technology as root, because Docker needs access to some rather sensitive pieces of the system, and interact with the kernel. That’s how it works.

    systemctl start docker

    Now we can go crazy and begin using Docker.

    This is the original

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.