boot2docker

How to increase the swap space available in the boot2docker virtual machine?

荒凉一梦 提交于 2019-12-04 03:10:41
I would like to run a docker container that requires a lot of memory on a machine that doesn't have much RAM. I have been trying to increase the swap space available for the container to no avail. Here is the last command I tried: docker run -d -m 1000M --memory-swap=10000M --name=my_container my_image Following these tips on how to check memory metrics I found the following: $ boot2docker ssh docker@boot2docker:~$ cat /sys/fs/cgroup/memory/docker/35af5a072751c7af80ce7a255a01ab3c14b3ee0e3f15341f7bb22a777091c67b/memory.stat cache 454656 rss 65015808 rss_huge 29360128 mapped_file 208896

Performing a npm install via Docker on a windows host

时间秒杀一切 提交于 2019-12-04 02:45:16
I'm trying to create a docker dev tools container for a devlopement environment on a windows host via docker toolbox but I have some trouble running the npm install command. It worked fine on a linux host but on the windows host I got the following error : npm ERR! Linux 4.1.13-boot2docker npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" npm ERR! node v5.5.0 npm ERR! npm v3.3.12 npm ERR! path /var/www/site/.npm/gulp/3.9.0/package.tgz.e87c24357cd6065ee71ce44c6f23673b npm ERR! code ETXTBSY npm ERR! errno -26 npm ERR! syscall rename npm ERR! ETXTBSY: text file is busy, rename '

Specifying superuser PostgreSQL password for a Docker Container

梦想的初衷 提交于 2019-12-04 02:10:11
When running a PostgreSQL database in a Docker container, the documentation for the official PostgreSQL Docker Image specifies that the administrator password should be set in an environmental variable like: docker run --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -d postgres For those that do not want to hard-code a plain-text password in their scripts, are there more secure options to consider? Injecting configuration settings as environment variables is the approach to application configuration recommended by the 12 factor app website. http://12factor.net/config Alternatively

Boot2Docker - Access webserver as localhost

三世轮回 提交于 2019-12-03 19:58:23
问题 Created a apache webserver as Docker container but want to access it on windows os browser as localhost. I can access the webserver with boot2docker private ip address which is 192.168.59.103 but would like to access the webserver as localhost i.e 127.0.0.1. Following is my Docker Container setup Running Boot2docker on Oracle VM Exposed ports : "EXPOSE 80 443" in docker file Command used to create Docker File : docker run --net=host --name=webserver1 -v /home/data:/data/www/www

The right way to move a data-only docker container from one machine to another

柔情痞子 提交于 2019-12-03 16:03:13
I have a database docker container that is writing its data to another data-only container. The data-only container has a volume where it stores the data of the database. Is there a "docker" way of migrating this data-only container from one machine to another? I read about docker save and docker load but these commands save and load images, not containers. I want to be able to package the docker container along with its volumes and move it to another machine. Checkout the flocker project. Very interesting solution to this problem, using ZFS to snapshot and replicate the storage volume between

Boot2Docker: Connect to container over LAN

风格不统一 提交于 2019-12-03 13:51:15
问题 I'm using Boot2Docker 1.3.0 on my Mac and I'm pretty happy so far using it. But now I'd like to connect to a http container (exposes port 8080) not from my local machine but from another machine in my local network? If I'm doing it locally I just use http://192.168.59.103:8080 so I'm using the ip address of the docker host. This can't work for other machines in my local network but using the ip address of my mac does not work either. I'm pretty sure there are some solutions for this problem

Ubuntu based docker-machine image

隐身守侯 提交于 2019-12-03 13:50:34
Is there a possibility to simply create a docker-machine that is non-boot2docker based (i.e., Ubuntu based) (which uses virtualbox driver)? I would like to have full-featured Linux distro running the docker daemon on my mac instead of Tiny Core Linux distro which is fast and lightweight but doesn't offer me all the debugging facilities I need. I know I can create it manually. I'm just wondering if there is a simple way such as docker-machine create is. You could take advantage of the --virtualbox-boot2docker-url option. This issue illustrates its usage (with an iso which is not a TinyCore one,

docker-machine: no machine name, no “default” exists

左心房为你撑大大i 提交于 2019-12-03 10:30:02
问题 I downloaded and installed Docker for Windows 1.12.1 which in turn installed the docker-machine and docker-compose. I did not install "Docker Toolbox" since its a duplicate of what was installed and my system meets the requirements. Everything seems to work fine except for docker-machine, I'm running through a tutorial and when I run various docker-machine commands like "ip" or "env" I get the following message. Error: No machine name(s) specified and no "default" machine exists. So when I do

Boot2docker/Windows: can't run bash on Ubuntu container

折月煮酒 提交于 2019-12-03 10:09:04
问题 I'm working through "The Docker Book", am on chapter 3, installing and running an Ubuntu container. I'm on Windows 7.1, using Boot2Docker. Here's what happens when I try to run it (this is the second attempt, so it already has a local copy of the image): $ docker run -i -t ubuntu /bin/bash exec: "C:/Program Files (x86)/Git/bin/bash": stat C:/Program Files (x86)/Git/bin/bash: no such file or directory FATA[0000] Error response from daemon: Cannot start container

Docker: Error response from daemon: rpc error: code = 2 desc = “oci runtime error: exec format error”

帅比萌擦擦* 提交于 2019-12-03 09:43:00
问题 I wrote the following docker file FROM cloudera/quickstart MAINTAINER abhishek "http://www.foobar.com" ADD ./SparkIntegrationTestsAssembly.jar / ADD ./entrypoint.sh / ADD ./twitter.avro / EXPOSE 8020 50070 50010 50020 50075 8030 8031 8032 8033 8088 8040 8042 10020 19888 11000 8888 18080 7077 RUN chmod +x /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] i built my image using the command docker build --tag foobar:auto . The output of this command was Sending build context to Docker daemon 93.1 MB