virtual-machine,docker,containers , Docker images as OS for multiple servers


Docker images as OS for multiple servers

Question:

Tag: virtual-machine,docker,containers

I received a rather puzzling question from my lecturer about Docker after doing a presentation on the differences between docker.io and virtual machines. I told him that the main purpose of docker.io is to deploy software applications without the need of a virtual machine's hypervisor.

The question is: Is it possible for Docker to deploy images with CentOS as base to several servers with no OS installed?


Answer:

Docker uses an existing OS kernel that it makes available to the containers, so : No, it cannot run on "bare-metal", you need an underlying OS to provide the kernel.

But it does not have to be CentOS to run CentOS-based containers (as long as it uses a CentOS-compatible kernel).

In addition to that, the docker software itself needs some userland utilities to run, too.


Related:


How to mount volume for docker container via yaml manifest?


docker,google-cloud-platform,google-container-engine
I try to launch container-vm machine with following yaml: version: v1 kind: Pod spec: containers: - name: simple-echo image: gcr.io/google_containers/busybox command: ['nc', '-p', '8080', '-l', '-l', '-e', 'echo', 'hello world!'] imagePullPolicy: Always ports: - containerPort: 8080 hostPort: 8080 protocol: TCP volumeMounts: - name: string mountPath: /home readOnly: false restartPolicy: Always...

Docker-compose and pdb


python,docker,pdb,docker-compose
I see that I'm not the first one to ask the question but there was no clear answer to this: How to use pdb with docker-composer in Python development? When you ask uncle Google about django docker you get awesome docker-composer examples and tutorials and I have an environment working...

Passing Elasticsearch and Kibana config file to docker containers


elasticsearch,docker,kibana,kibana-4
I have found a docker image devdb/kibana which runs Elasticsearch 1.5.2 and Kibana 4.0.2. However I would like to pass into this docker container the configuration files for both Elasticsearch (i.e elasticsearch.yml) and Kibana (i.e config.js) Can I do that with this image itself? Or for that would I have...

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


docker,boot2docker
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, it's very inconvenient. What is your way when you...

Golang failes to change the name of imported module


go,docker,skydns
I'm trying to bring SkyDNSv1 back to life and build it from my fork (here is Dockerfile). SkyDNS was really good and simple tool for the quick service discovery, but it wasn't updated for a long time. There is an error in build process and it's caused by third party...

How to see a linked container as localhost?


docker,docker-compose
I have this two containers : api: image: social-learning ports: - "3000:3000" command: bundle exec rails s -p 3000 -b '0.0.0.0' volumes: - ../api:/app expose: - "3000" web: image: social-learning-frontend ports: - "4200:4200" - "9000:9000" command: ember serve -p 4200 volumes: - .:/app links: - api expose: - "3000" When...

problems understanding workflow and set up of vagrant and laravel homestead


laravel,vagrant,virtual-machine,homestead
Up till now I've used a wamp server and thought I'd give Laravel Homestead a try as it's meant to be easier! I'm having problems getting the set up right and I'm confused about what I'm doing and where I should be doing them. I've got vagrant and virtual box...

Installing Python 3 Docker Ubuntu error command 'x86_64-linux-gnu-gcc


python,python-3.x,amazon-web-services,docker
I'm trying to create a dockerfile that uses Python 3. FROM ubuntu:14.04 RUN apt-get update RUN apt-get install -y python3 python3-dev python-pip RUN apt-get install -y libxml2-dev libxslt1-dev libpq-dev libjpeg-dev libfreetype6-dev zlib1g-dev RUN cd /var/projects/apps && pip install -r requirements.txt I get the error fatal error: Python.h: No such file...

Not able to access Kibana running in a Docker container on port 5601


elasticsearch,docker,dockerfile,kibana-4
I have built a docker image with the following Docker file. # gunicorn-flask FROM devdb/kibana MAINTAINER John Doe <[email protected]> ENV DEBIAN_FRONTEND noninteractive RUN apt-get update RUN apt-get install -y python python-pip python-virtualenv gunicorn # Setup flask application RUN mkdir -p /deploy/app COPY gunicorn_config.py /deploy/gunicorn_config.py COPY app /deploy/app RUN pip install...

When should you create more than one docker container image instance with Kubernetes Replication Controller?


docker,google-compute-engine,kubernetes
When using Kubernetes to manage your docker containers, particularly when using the replication controller, when should you increase an images running container instances to more than 1? I understand that Kubernetes can spawn as many container replicas as needed in the replication controller configuration file, but why spawn multiple running...

(Networking) XM6i emulating NetBSD 4.0.1 x68k


virtual-machine,68000,netbsd
I have installed NetBSD 4.0.1 x68k on XM6i (http://www.ceres.dti.ne.jp/tsutsui/netbsd/x68k/NetBSD-x68k-on-XM6i.html) as a virtual machine emulating a 68030 platform. I have gotten everything to work except networking. According to the documentation, you need to install a TAP-Win32 network adapter from OpenVPN installer, which I have. I have set the ipv4 settings of...

Where does kubernete's kubelet create service environment variables?


node.js,docker,service-discovery,kubernetes
I'm creating a kubernetes cluster, and in it I have several services. I know based on https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/services.md#discovering-services I have two options. use the environment variables set by the kubelet. use skydns I want to try to use the environment variables first before I go adding another dependency into the mix....

Unable to get docker containers running disque to establish a cluster


docker,disque
I put together a docker container building disque https://registry.hub.docker.com/u/jobflow/disque/ I am able to deploy and run a single service. I can expose a port and connect to it from a disque client running on the same container or a different container. But when connect to one instance and send the...

autoexpect on docker centos6.6 container cannot work


centos,docker,expect,autoexpect
Docker container pure image: centos6.6 after bash, I install these: yum -y install tar zip unzip expect glibc.i686 Package expect-5.44.1.15-5.el6_4.x86_64 already installed and latest version and run autoexpect, I always get these error: [[email protected] bin]# autoexpect autoexpect started, file is script.exp no such variable (read trace on "env(SHELL)") invoked from...

Vagrant + puppet + docker


mysql,docker,vagrant,puppet
I'm new with this technologies but I want to learn about automation and containers stuff. I read some documentation about this 3 products and I want to know if is possible to automate almost everything in a large environment using this products. Vagrant for deploy VMs (let's say 10 at...

difference between docker attach and docker exec


docker,exec
Both will be able to execute commands in container. Both could detach the container. So what is the real difference between docker exec and docker attach?...

Docker container http requests limit


http,elasticsearch,docker
I'm new to Docker so, most likely, I'm missing something. I'm running a container with Elasticsearch, using this image. I'm able to setup everyhing correctly. After that I was a using a script developed by a collegue in order to insert some data, basically querying a MySQL database and making...

Is there a way to tell kubernetes to update your containers?


automation,docker,kubernetes
I have a kubernetes cluster, and I am wondering how (best practice) to update containers. I know the idea is to tear down the old containers and put up new ones, but is there a one-liner I can use, do I have to remove the replication controller or pod(s) and...

Configure Dockerfile to set AWS configurations


node.js,amazon-web-services,docker
I've just started looking at Docker. I have a node app that resizes and image and then sends an SQS message to aws when finished. I have managed to create a docker image of my app, copying it from my local machine, but run into the issue that I can't...

PyCharm add remote Python interpreter inside the Docker


python,docker,pycharm,remote-debugging,boot2docker
So I have set up a docker on my laptop. I'm using Boot2Docker so I have one level of indirection to access the docker. In PyCharm, I can set a remote python interpreter via SSH but I'm not sure how to do it for dockers that can only be accessed...

Docker inspect with unix:///var/run/docker.sock (in Java or Scala)


java,scala,docker
Docker has lots of interesting information available via unix:///var/run/docker.sock I have been able to map this to a port and I can access /containers/json with GET requests to the port. But... this is not exactly secure. How can I access /containers/json from this raw socket file (in Java or Scala)?...

connect to mysql database which is in ubuntu server


php,mysql,ubuntu,azure,virtual-machine
I am using below code to connect MySQL database in PHP. try { shell_exec("ssh -f -L 3307:127.0.0.1:3306 [email protected]_ip sleep 60 >> logfile"); $this->_conn = $this->dbh = new PDO('mysql:host=127.0.0.1;dbname=my_db', DB_USER, DB_PASS); $this->dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } catch (PDOException $e) { die("Couldn't connect to database. Please try again!"); } I want to direct connect...

What is the '.save_docker/' folder? Can I delete it?


linux,docker
After using docker, I found my disk space had been eat a lot. I searched google to resolve the problem, found a post said this is because of aufs & devicemapper. Now I found a folder named .save_docker in /home. In this folder, there is a folder names aufs, the...

docker run python from container


docker
I took over a project which requires the usage of docker to setup the development environment. The project wiki is primarily written for use with coreos and one of the setup steps involved running a python script. I'm using boot2docker and realised that there's no python pre-installed with the tcl....

Run Boot2Docker from bash


osx,bash,docker,boot2docker
I have installed Boot2Docker on my Mac. By clicking on the app icon, a terminal window opens with some bash script running to prepare the docker vm and then you're good to go. My problem is, I want to write a bash script to run the Boot2Docker vm and then...

Meteor mupx ssl configuration is not working, still routing to port 80


javascript,ssl,meteor,docker
Heres my mup.json: // Configure environment "env": { "PORT": 3000, "ROOT_URL": "https://www.exomatch.com" }, //SSL "ssl": { "certificate": "ssl/ssl.crt", // this is a bundle of certificates "key": "ssl/private.key", // this is the private key of the certificate "port": 443 // 443 is the default value and it's the standard HTTPS port...

docker run local script without host volumes


database,shell,docker,docker-compose
The goal is to add data to my database server containers of a multi-container web app from a download using curl once the database containers are running. I can do this from docker-compose.yml or from docker run independent of the web app, as long as I use host volumes. How...

Does Google Container Registry undergo issues?


docker,google-cloud-platform,google-container-engine,google-container-registry
I am facing an issue while using container optimized VMs. I launch an instance with following command: gcloud compute instances create "$instance_name" \ --tags "http-server" \ --image container-vm \ --scopes storage-rw,logging-write \ --metadata-from-file google-container-manifest="m2.yml" \ --zone "$my_zone" \ --machine-type "$my_machine_type" where m2.yml is: version: v1beta2 containers: - name: nginx image:...

My docker container was created with no name and no tag


docker,boot2docker
I'm creating a docker image for hakyll compilation. Here's the dockerfile: FROM haskell:7.10 RUN cabal update && cabal install hakyll This file is in some folder on my D: drive: D:\Haskell\docker\docker-hakyll. I'm using Boot2Docker on Windows to build it. docker images gives me REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE...

Creating a docker swarm cluster in Vagrant


ubuntu,vagrant,virtual-machine,docker-swarm
I'm trying to create a swarm cluster of diffferent ubuntu VMs running in Vagrant. These have docker enabled via the vagrant file that boots them. Of the three VM's I started the swarm cluster on one machine in the following way docker pull swarm docker run --rm swarm create This...

docker set iptables options in docker-compose.yml


docker
I'm using docker-compose for managing containers. How to I turn off iptables (set --iptables=false for docker) when starting via docker-compose up?...

Access binaries inside docker


ubuntu,meteor,docker
I am using Meteor and Meteur Up package to push a bundle to server. It uses docker. The problem is that I cannot access graphicsmagick or imagemagick from inside a docker to use it in my app. However it is installed on the server and I can access it when...

ctrl+G in erl doesn't work


unicode,encoding,utf-8,erlang,docker
I'm trying to interconnect erlang nodes, but entering ctrl+G doesn not work: Eshell V6.4.1 (abort with ^G) 1> ^G Eshell V6.4.1 (abort with ^G) 1> ^G Eshell V6.4.1 (abort with ^G) 1> ^G Eshell V6.4.1 (abort with ^G) any idea why this can happen? I was thinking about locale settings,...

What tool can manage Docker container to start in order?


docker,containers
We're trying to port our system to the containers, currently we try Docker module with Puppet and we face an issue with the order of starting some specific conainers. We have a web application, MySQL, NginX and then everything connect through HAproxy. Each of them live in their own container....

How to customize the configuration file of the official PostgreSQL docker image?


postgresql,docker
I'm using the the postgres official image https://registry.hub.docker.com/_/postgres/. And now I'm trying to customize its configuration. For this purpose the command sed is used, e.g. to change the max_connections: sed -i -e"s/^max_connections = 100.*$/max_connections = 1000/" /var/lib/postgresql/data/postgresql.conf I tried two methods to apply this configuration. The first is by adding...

Why are images created and why doesn't Docker clean them up?


docker
I know how to removed containers and images. What I don't understand is why those <none> images are created in the process of a docker build -t my_container . or a similar command. Running docker images will give me something like that: REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE go_dev...

Syncing Vagrant VMs across different physical servers


linux,vagrant,backup,virtual-machine,sync
I'm using Vagrant to deploy my VMs and my current setup looks like this: server1 = VM1, VM2, VM3 ( main production server ) server2 = VM1, VM2, VM3 ( backup server ) My questions is, can I somehow sync the VMs across the different physical servers in case one...

Best practice for docker webserver, muliple layers or single layer?


webserver,docker
I want to build a docker webserver, serving Nginx, PHP and MySQL for multiple websites. Would it be better to run a single docker container for each component, ie one for MySQL, one for Nginx, One for PHP and another for my site data. Or Run multipul containers that each...

Server and client network apps simulated in one machine


docker,systemd
I would like to simulate a server machine and several client machines operating over a vpn. I would like to test the server application as well as the client applications all on one machine. Would I be able to do this with a few docker applications running on my machine...

Saving docker container image


jenkins,docker
I created a new docker container using jenkings image This is the command I ran docker run -p 8080:8080 -v /var/jenkins_home jenkins I created a few jobs on the jenkins instance and commited the image docker commit 7b903d061654 test When I run the image I created using the command (below)...

Use of container docker as a proxy for CF app to get public IP


docker,containers,bluemix
I need a public IP for my application: is it a proper solution to use docker container as a proxy? I can see the price increasing quite a lot with all traffic going through proxy to reach the application. Is there any other option recommended?

Ensure nginx master process stays running


nginx,docker,supervisord
I am currently trying to setup a docker container using ubuntu:14.04 as my base image, with nginx and gunicorn/django/celery running inside. I am using supervisor to start all of the processes, and have tested to make sure gunicorn is relaunched when it goes down. However, I can't figure out how...

Why is /etc/hosts file empty in my docker container?


docker
I created a minimal docker container, following https://github.com/snoyberg/haskell-scratch containing a single Haskell application. When run the application works fine except it cannot resolve hosts from /etc/hosts because it is empty which implies linking does not work correctly (or at least I need to use numeric addresses which is impractical...). I...

Any suggestion for running Aerospike on Kubernetes on CoreOS on GCE?


docker,google-compute-engine,kubernetes,aerospike
I would like to run Aerospike cluster on Docker containers managed by Kubernetes on CoreOS on Google Compute Engine (GCE). But since GCE does not permit multicast, I have to use Mesh heartbeat as described here, which has to be set up by specifying all node's IP addresses and ports;...

How do I turn sendfile off in a docker instance


linux,nginx,configuration,docker,sendfile
I have a nginx docker instance running. In the docker instance there is a file called /etc/nginx/nginx.conf It has the following settings http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" access_log /var/log/nginx/access.log main; sendfile on; .... } I run the docker instance by running with...

Docker Compose with one Terminating Container


docker,exit,exit-code,docker-compose,fig
I'm having a docker compose setup of a database container, an application container and one container which pre-loads the database with necessary data. I want to start all of the containers together with docker-compose up while the pre-loading container terminates after it is one with exit 0. But terminating this...

ERROR: (gcloud.preview) Invalid choice: 'docker'. Did you mean 'dm-v2'?


docker,google-cloud-platform,gcloud
Somehow I was able to push my docker image to Google Container Registry with command: $ gcloud preview docker push gcr.io/<my-project-xxx>/<my-image-yyy> I ran the commands yesterday and copied them to my notes, but today pasting them to terminal in the same order I get the error: ERROR: (gcloud.preview) Invalid choice:...

SocketError: No such file or directory - connect(2) for /var/run/docker.sock


ruby-on-rails,docker,boot2docker
I am trying to run a docker container inside a rails application, however I keep receiving the following error:- container = Docker::Container.create({'Image' => 'mitc/judge'}) Excon::Errors::SocketError: No such file or directory - connect(2) for /var/run/docker.sock (Errno::ENOENT)` The environment variables are set bash-3.2$ env | grep DOCKER DOCKER_HOST=tcp://192.168.99.100:2376 DOCKER_TLS_VERIFY=1 DOCKER_CERT_PATH=/Users/ayushlodha/.docker/machine/machines/dev The container...

Why does single-user with heredocs and multiline queries throw syntax errors for postgres+docker?


postgresql,docker
So I'm trying to create a Postgres database running on Docker. I have the following file /Users/wwerner/programming/test/dockerdb/build_db.sh: echo "************* Here comes your db! ****************" gosu postgres postgres --single <<- EOSQL CREATE SCHEMA test; CREATE TABLE test.will_fail ( id integer NOT NULL, name character varying NOT NULL); EOSQL echo "" echo...

How to edit file after I shell to a docker container?


docker
I successfully shelled to a docker container using docker exec -i -t 69f1711a205e bash Now I need to edit file and I don't have any editors inside [email protected]:/# nano bash: nano: command not found [email protected]:/# pico bash: pico: command not found [email protected]:/# vi bash: vi: command not found [email protected]:/# vim...