Questions tagged [boot2docker]

boot2docker is a lightweight Linux distribution based on Tiny Core Linux made specifically to run Docker containers. It runs completely from RAM, weighs approximately 27 MB and boots in approximately 5 seconds (your mileage may vary).

boot2docker is a lightweight distribution based on Tiny Core Linux made specifically to run containers on Windows and OS X systems. Boot2docker enables Windows and OS X users to easily create lightweight, portable, self-sufficient containers running Unix processes.

Download and Install

Boot2docker is an open-source project and can be downloaded from http://boot2docker.io/.

Instructions for use

Detailed instructions for using boot2docker can be found at https://github.com/boot2docker/boot2docker.

Tag usage

The tag on Stack Overflow is used for questions that relate to both and operating systems. For the benefit of others searching for answers, be sure to include the tag of your operating system in your question.

Related questions also appear on Super User for Windows and OS X.

913 questions
885
votes
27 answers

How to mount a host directory in a Docker container

I am trying to mount a host directory into a Docker container so that any updates done on the host is reflected into the Docker containers. Where am I doing something wrong. Here is what I did: kishore$ cat Dockerfile FROM ubuntu:trusty RUN apt-get…
Kishore
  • 9,146
  • 3
  • 13
  • 11
623
votes
12 answers

What's the difference between Docker Compose vs. Dockerfile

I have been reading up and learning about Docker, and am trying to correctly choose the Django setup to use. So far there is either: Docker Compose or Dockerfile I understand that Dockerfiles are used in Docker Compose, but I am not sure if it is…
509
votes
24 answers

Docker: How to clear the logs properly for a Docker container?

I use docker logs [container-name] to see the logs of a specific container. Is there an elegant way to clear these logs?
Youssouf Maiga
  • 6,701
  • 7
  • 26
  • 42
273
votes
12 answers

Docker - how can I copy a file from an image to a host?

My question is related to this question on copying files from containers to hosts; I have a Dockerfile that fetches dependencies, compiles a build artifact from source, and runs an executable. I also want to copy the build artifact (in my case it's…
Mark
  • 2,749
  • 2
  • 12
  • 5
145
votes
5 answers

Docker - image operating system "windows" cannot be used on this platform

I tried this on my Windows 10 machine: Dockerfile: From microsoft/nanoserver CMD ["echo", "Hello World"] PS C:\FSD\Docker\Trial1> docker build -t lea/leatest . Sending build context to Docker daemon 2.048kB Step 1/2 : FROM…
Lea A
  • 1,511
  • 2
  • 10
  • 9
138
votes
4 answers

Docker compose, running containers in net:host

I want to spawn 3 services in the "host" net using docker-compose. Here is my docker-compose.yml file: version: '2' services: mysql: image: mysql net: "host" nginx: image: nginx net: "host" app: image: tomcat net:…
Benoit Wickramarachi
  • 6,096
  • 5
  • 36
  • 46
135
votes
1 answer

How can I use a local file on container?

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…
zanini
  • 1,463
  • 2
  • 10
  • 9
127
votes
4 answers

Can we pass ENV variables through cmd line while building a docker image through dockerfile?

I am working on a task that involves building a docker image with centOs as its base using a Dockerfile . One of the steps inside the dockerfile needs http_proxy and https_proxy ENV variables to be set in order to work behind the proxy. As this…
Aniketh
  • 1,411
  • 3
  • 12
  • 15
124
votes
8 answers

How to copy file from host to container using Dockerfile

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…
Sasikiran Vaddi
  • 2,199
  • 4
  • 23
  • 29
95
votes
10 answers

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

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,…
Yevgeniy Brikman
  • 8,711
  • 6
  • 46
  • 60
92
votes
6 answers

Get the size of a Docker image before a pull?

How does one get the size of a Docker image before they pull it to their machine?
Joseph Idziorek
  • 4,853
  • 6
  • 23
  • 37
92
votes
14 answers

docker error: /var/run/docker.sock: no such file or directory

I am new to docker. I have a shell script that loads data into impala and I want a docker file that runs builds an image and run the container. I am on mac, installed boot2docker and have the DOCKER_HOST env set up. bash-3.2$ docker info Containers:…
user1189851
  • 4,861
  • 15
  • 47
  • 69
84
votes
14 answers

Docker error: client and server don't have same version

Since I just updated Docker to 1.1.0 I get: Error response from daemon: client and server don't have same version (client : 1.13, server: 1.12) Do you know how to fix this? I switched back to 1.0.1 and everything works again.
soenke
  • 1,023
  • 1
  • 8
  • 8
83
votes
3 answers

What does the DOCKER_HOST variable do?

I'm new to Docker, using Boot2Docker on OSX. After booting it, this message is given: To connect the Docker client to the Docker daemon, please set export DOCKER_HOST=tcp://192.168.59.103:2375 Yet even without it, basic Docker commands (eg, docker…
Steve Bennett
  • 114,604
  • 39
  • 168
  • 219
82
votes
8 answers

exited with code 0 docker

I'm trying to launch container using docker-compose services.But unfortunetly, container exited whith code 0. Containers is build thanks to a repository which is from a .tar.gz archive. This archive is a Centos VM. I want to create 6 container from…
Sylvain M.J.
  • 823
  • 1
  • 6
  • 5
1
2 3
60 61