boot2docker

What's the right way to set up a development environment on OS X with Docker?

蹲街弑〆低调 提交于 2019-11-27 16:42:57
Intro I can't figure out a good way to set up a development environment on OS X using Docker and Boot2Docker. The problem I'm hitting is how to manage the source code so that: I can modify the code on OS X using the tools (text editor, IDE, git, etc) I already have installed. Those modifications are reflected in the Docker container so if I re-run tests or refresh a webpage, I can see my changes immediately. In theory, this should be easy to do by mounting my source code as a volume: docker run -it -v /path/to/my/source/code:/src some-docker-image Unfortunately, this has two major issues that

Boot2Docker: can't get ports forwarding to work

纵然是瞬间 提交于 2019-11-27 15:50:43
I'm playing with boot2docker (docker 1.6) on windows 8.1. I wanted to make myself machine container to play with ruby and I want to be able to connect to rails server from my windows host. To start with small steps first I want to connect to my container from my boot2docker VM. I attach my docker file below, it builds without a problem and I can run a container from it. I do it like so: docker run -it -p 3000:3000 3564860f7afd /bin/bash Then in this container I say: cd ~/myapp && bundle exec rails server -d And to see if everything is working I do: ~/myapp$ sudo apt-get install wget && wget

/var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS?

风流意气都作罢 提交于 2019-11-27 13:45:36
问题 I am very new to the docker when try to run docker info it gives me following error. $ docker info FATA[0000] Get http:///var/run/docker.sock/v1.17/info: dial unix /var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS? I am using ubuntu 14.04. I followed the installation istructions mentioned on https://docs.docker.com/installation/ubuntulinux/#installing-docker-on-ubuntu But I'm still getting the error. How can I fix this? 回答1: This

boot2docker startup script to mount local shared folder with host

杀马特。学长 韩版系。学妹 提交于 2019-11-27 12:06:59
I'm running boot2docker 1.3 on Win7. I want to connect a shared folder. In the VirtualBox Manager under the image properties->shared folders I've added the folder I've want and named it "c/shared". The "auto-mount" and "make permanent" boxes are checked. When boot2docker boots, it isn't mounted though. I have to do an additional: sudo mount -t vboxsf c/shared /c/shared for it to show up. Since I need that for every time I'll ever use docker, I'd like that to just run on boot, or just already be there. So I thought if there were some startup script I could add, but I can't seem to find where

How can I use a local file on container?

本小妞迷上赌 提交于 2019-11-27 11:42:55
问题 I'm trying create a container to run a program. I'm using a pre configurate image and now I need run the program. However, it's a machine learning program and I need a dataset from my computer to run. The file is too large to be copied to the container. It would be best if the program running in the container searched the dataset in a local directory of my computer, but I don't know how I can do this. Is there any way to do this reference with some docker command? Or using Dockerfile? 回答1:

How to copy file from host to container using Dockerfile

耗尽温柔 提交于 2019-11-27 11:38:23
问题 I have written a Dockerfile which looks like this FROM ubuntu:12.04 RUN apt-get update RUN apt-get install -y wget Now I'm having a file called abc.txt in my host machine. How can I copy it to this container. Is there any step that I can add in Dockerfile which copy from Host to Container. 回答1: Use COPY command like this: COPY foo.txt /data/foo.txt # where foo.txt is the relative path on host # and /data/foo.txt is the absolute path in the image read more details for COPY in the official

What's the best way to share files from Windows to Boot2docker VM?

╄→尐↘猪︶ㄣ 提交于 2019-11-27 10:52:50
I have make my code ready on Windows, but I find it's not easy to share to boot2docker. I also find that boot2docker can't persistent my changes. For example, I create a folder, /temp , after I restart boot2docker. This folder disappears, and it's very inconvenient. What is your way when you have some code on Windows, but you need to dockerize them? ---update--- I try to update the setting in VirtualBox and restart boot2docker, but it's not working on my machine. docker@boot2docker:/$ ls -al /c total 4 drwxr-xr-x 3 root root 60 Jun 17 05:42 ./ drwxrwxr-x 17 root root 400 Jun 17 05:42 ../ dr-xr

How to use --volume option with Docker Toolbox on Windows?

核能气质少年 提交于 2019-11-27 09:31:22
问题 How can I share a folder between my Windows files and a docker container, by mounting a volume with simple --volume command using Docker Toolbox on? I'm using "Docker Quickstart Terminal" and when I try this: winpty docker run -it --rm --volume /C/Users/myuser:/myuser ubuntu I have this error: Invalid value "C:\\Users\\myuser\\:\\myuser" for flag --volume: bad mount mode specified : \myuser See 'docker run --help'. Following this, I also tried winpty docker run -it --rm --volume "//C/Users

Connect to a Service running inside a docker container from outside

吃可爱长大的小学妹 提交于 2019-11-27 09:22:18
I have a service running in a docker container (local machine). I can see the service URL in the Ambari service config. Now I want to connect to that service using my local development environment. I found I can connect to that within the container but when I use that URL outside in my local I get connection refused. Cause: org.apache.http.conn.HttpHostConnectException: Connect to xx.xx.xx.com:12008 [xx.xx.xx.com/195.169.98.101] failed: Connection refused How to connect to a service running inside a container from outside? In my case code execute in my local machine. VonC If your container has

Docker on Windows (Boot2Docker) - certificate signed by unknown authority error

梦想的初衷 提交于 2019-11-27 09:20:06
问题 I am running Docker on Windows (boot2docker + Oracle Virtual Box). In my corporate environment they modify the certificates so that the CAs are the company's self signed CA's. Thus, the chain ends up like this: Company's CA |__ Company's Intermediate CA |__ Docker Certificate When I try to run any command, such as: docker run hello-world I get this error: Get https://index.docker.io/v1/repositories/library/hello-world/images: x509: certificate signed by unknown authority I have found several