docker-machine

Docker实操:1.制作Erlang开发环境镜像

ぐ巨炮叔叔 提交于 2019-12-05 03:14:13
1.安装docker toolbox 1)在官网上下载OS上需要的docker toolbox。 2)下载完成后,像安装OS上的软件一样来安装docker toolbox。安装完成后,你会发现此时安装了一个virtualbox。同时也安装了docker的相关命令,比如docker-machine等。 2.安装docker虚拟机 利用上述步骤安装的docker-machine来安装一个docker虚拟机,名字为default,命令是docker-machine run default. 此时就会创建一个虚拟机叫做default。 3.连接虚拟机 这里直接给出命令了:docker-machine ssh default.如果你再宿主机上安装了多个虚拟机,你可以使用docker-machine ls来查看。同时,你也可以使用docker-machine env default来查看虚拟机的信息。 4.拉取镜像 通过第三步以后,你已经连接上虚拟机了。因此,你可以直接在里面来拉取docker的镜像了。我这里拉取了ubuntu最新的镜像。命令是docker pull ubuntu ,针对国内下载镜像很慢的情况,国内的DaoCloud做了一个镜像,在使用他的镜像之前,你需要在虚拟机上使用命令来安装他的一个加速器,安装加速器后,速度蹭蹭往上加快。命令是:curl -sSL https://get

Docker Machine vs Docker run

放肆的年华 提交于 2019-12-05 00:48:49
I'm confused between docker-machine vs docker run docker images, shows me my images and then I can run one of these images with docker run. When do I need to use docker-machine? You would use docker-machine if you: Have a VirtualBox based install of Docker for Win/Mac, rather than the newer HyperV or xhyve releases. Have machines in the cloud that you'd like to manage from docker-machine docker-machine includes boot2docker images to do an install and it acts as a wrapper to setting the docker environment variables to point the client to a remote host. You can easily do that latter part by hand

Change file permissions in mounted folder inside docker container on Windows Host

旧巷老猫 提交于 2019-12-05 00:28:38
问题 Disclaimer/Edit 2 Some years later, for everyone reading this question - If you are on Windows and want to use docker with linux containers, I highly recommend not using docker for windows at all and instead starting the entire docker environment inside a VM altogether. This Ext3 NTFS issue will break your neck on so many different levels that installing docker-machine might not even be worth the effort. Edit: I am using docker-machine which starts a boot2docker instance inside a Virtualbox

Failed to create the host-only adapter - windows 10, docker, virtualbox

戏子无情 提交于 2019-12-04 19:11:46
问题 I've recently run into this problem after having used docker toolbox without a problem for a while. Started happening after windows update? Windows 10 Home - 64 Uninstalled and reinstalled Docker toolbox Uninstalled and reinstalled various versions of VirtualBox Still get the same error Running pre-create checks... Creating machine... (default) Copying C:\Users\me\.docker\machine\cache\boot2docker.iso to C:\Users\me\.docker\machine\machines\default\boot2docker.iso... (default) Creating

Not able to connect docker from host when network change Docker for Windows

╄→尐↘猪︶ㄣ 提交于 2019-12-04 18:37:43
I am not able to connect to docker container when there is network/ip change from office to home. But the same works with localhost or 127.0.0.1 I am connecting to VPN to connect to database. root@1c970ed5cd64:/etc# curl http://localhost:8090/admin/health_check/all {“health”:“passed”}root@1c970ed5cd64:/etc# curl http://192.168.0.103:8090/admin/health_check/all curl: (7) Failed to connect to 192.168.0.103 port 8090: Connection refused When i install docker again everything works fine. I have created docker-machine with external virtual switch pointing to wifi and ran the container with the host

/var/run/docker.sock: permission denied while running docker within Python CGI script

試著忘記壹切 提交于 2019-12-04 18:29:43
问题 I am trying to run Python CGI script inside which I need to run docker image. I am using Docker version 1.6.2. user is "www-data", which is added in docker group. www-data : www-data sudo docker On machine, with www-data I am able to execute docker commands www-data@mytest:~/html/new$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES I am getting following error while running docker image from Python CGI script: fatal msg="Get http:///var/run/docker.sock/v1.18/images/json: dial

Setup docker toolbox behind proxy on Windows

不羁的心 提交于 2019-12-04 16:54:42
As per my corporate policies, we are using windows 7, with privileged access (subset of admin rights) on the machine. I have installed docker toolbox however when its time to pull images from Docker hub of companies Artifactory i was getting issues because of HTTPS and proxy. I finally figured this out on how properly to set-up docker toolbox on windows 7 behind corporate proxy with HTTPS certs. Following are the steps Install Docker Toolbox After installation, go to C:/Users//.docker/machine/machine/default and open config.json. If you do not have that folder, then please open "Docker

Failed to get D-Bus connection: Operation not permitted

依然范特西╮ 提交于 2019-12-04 16:16:33
问题 I'm trying to install ambari 2.6 on a docker centos7 image but in the the ambari setup step and exactly while intializing the postgresql db I receive this error: Failed to get D-Bus connection: Operation not permitted I've got this error every time I try to run a serice on my docker image. I tried every solution in the net but nothing worked yet. Does any one have an idea how to resolve this ? Thank you in advance 回答1: Use this command docker run -d -it --privileged ContainerId /usr/sbin/init

Accessing node_modules after npm install inside Docker

心已入冬 提交于 2019-12-04 14:34:27
I am running Docker with Docker Machine on Mac. I successfully set up some containers and ran npm install inside them, as explained here . This installs the node_modules inside the image and inside the container, but they are not available on the host, i.e. my IDE complains about missing node_modules. Am I missing something? What is the best way to run npm install inside the container but be able to do development (with these dependencies) on the host? From my docker-compose.yml: volumes: - /Users/andre/IdeaProjects/app:/home/app - /home/app/node_modules Since you are using boot2docker , only

Wrong permissions in volume in Docker container

两盒软妹~` 提交于 2019-12-04 10:04:30
I run Docker 1.8.1 in OSX 10.11 via an local docker-machine VM. I have the following docker-compose.yml: web: build: docker/web ports: - 80:80 - 8080:8080 volumes: - $PWD/cms:/srv/cms My Dockerfile looks like this: FROM alpine # install nginx and php RUN apk add --update \ nginx \ php \ php-fpm \ php-pdo \ php-json \ php-openssl \ php-mysql \ php-pdo_mysql \ php-mcrypt \ php-ctype \ php-zlib \ supervisor \ wget \ curl \ && rm -rf /var/cache/apk/* RUN mkdir -p /etc/nginx && \ mkdir -p /etc/nginx/sites-enabled && \ mkdir -p /var/run/php-fpm && \ mkdir -p /var/log/supervisor && \ mkdir -p /srv