w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
  Home » DOCKER » Page 1
Docker - Install CI Server on a remote host
If you need all the userspace files of Ubuntu, then this is how Docker operates - in order to promise that you can lift your container off an Ubuntu machine and run it on a different Linux, Docker has its own copy of everything above the kernel. This will be shared amongst every container based on Ubuntu, but still it's a couple of hundred megs of disk space. If you don't need so much from Ubunt

Categories : Docker

How do you specify cpu or memory resource on container in kurbenetes
You can see examples of Kubernetes resources being specified at https://github.com/GoogleCloudPlatform/kubernetes/blob/master/examples/guestbook/frontend-controller.json#L16 However, Kubernetes (hence Kubernetes-Mesos) doesn't really do anything with these resources yet, as per https://github.com/GoogleCloudPlatform/kubernetes/issues/168 Once this is implemented in Kubernetes, the Kubernetes-Mes

Categories : Docker

Remove docker image depending on an already removed image
Switched off docker through service docker.io stop changed the DOCKER_OPTS in /etc/default/docker.io to DOCKER_OPTS="--graph=/home/kasper/dockerrepo" restarted docker through service docker.io start and then removed Var/lib/docker. Didn't figure out a finer grained way of cleaning this up.

Categories : Docker

How to expose ports?
If you're only going to do this once on your host, and assuming they are TCP ports, you can 'publish' them like this: sudo docker run -p 6633:6633 -p 8080:8080 my_image The -p option is described more at the top of this page: http://docs.docker.com/userguide/dockerlinks/

Categories : Docker

Docker pull not getting image tagnames
When you do a docker pull <image> you will only get the latest tag for that image. This is expected behaviour. To pull a specific tag, use docker pull <image>:<tag>. The list there in the documentation should only be expected if you've followed the full guide and used all those images. You usually only need one tag for an image.

Categories : Docker

Docker's NAT table output chain rule
This rule would match all packets originating at the local machine (since it's in the OUTPUT chain), destined to a locally hosted IP address which doesn't begin with 127.X.X.X. Such packets are handed over to the DOCKER chain for further processing. A locally hosted IP address which doesn't begin with 127.X.X.X matches each of the IP addresses defined to the machine's interfaces. This includes dy

Categories : Docker

Running HHVM's "hh_server" tool inside Docker container fails
I had the exact same problem on a Debian image. After talking to a guy at hhvm's IRC channel I got it working by setting the USER environment variable to a username. Apparently hh_server don't work if USER is empty

Categories : Docker

Creating a Dockerfile - docker starts from scratch on each new build
If I understood correctly you can look at Docker as version control system where each line in your Dockerfile is a commit to the container. If you add new line to your Dockerfile, Docker get the last revision of container and make a new commit. If you add line on the middle of your Dockerfile, Docker get one of the previous revisions and make new commit to this part of the tree.

Categories : Docker

Is there any way to make Docker download public images faster?
Have you looked at this article Dockerizing an Apt-Cacher-ng Service http://docs.docker.com/examples/apt-cacher-ng/ extract This container makes the second download of any package almost instant.

Categories : Docker

Configure fig to run one container before another
Just a few ideas: You can wrap grunt execution in a bash script that waits for bower to complete - for example bower creates a file on a shared volume on exit. Or you can create a 'dispatcher' image, that launches your bower container and grunt container in sequence using docker API, or command line and shared docker socket. Or, and I guess it is the best option, run bower and then grunt inside

Categories : Docker

How to see image tag name in my private docker registry
From this command, (curl) you will get the list of docker images in name only. Like HTTP/1.1 200 OK Vary: Accept Content-Type: application/json {"num_pages": 1, "num_results": 3, "results" : [ {"name": "ubuntu", "description": "An ubuntu image..."}, {"name": "centos", "description": "A centos image..."}, {"name": "fedora", "description": "A fedora image..."} ], "page_siz

Categories : Docker

Docker exec runs command on host machine instead of container
I found what caused the issue kernel < 3.8 is not supported https://github.com/docker/docker/issues/8976 So for example on following machine it will not work: uname -a Linux VIR005-M033-APP 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64 GNU/Linux

Categories : Docker

docker client can't read from both "docker private registry" and "online docker registry" if custom ssl certificate are used
The correct place to put the certificate is on the machine running your docker daemon (not the client) in this location: /etc/docker/certs.d/my.registry.com:5000/ca.crt where my.registry.com:5000 is the address of your private registry and :5000 is the port where your registry is reachable. If the path /etc/docker/certs.d/ does not exist, you should create it -- that is where the Docker daemon wil

Categories : Docker

MESOS / MARATHON / DOCKER - Docker started is wrong & Port Forwarding
Here is an anwser from ConnerDoyle found on mIRC #mesos : ConnorDoyle: Mesos comes with a Docker containerizer that always pulls from a docker registry. You can configure the registry that dockerd pulls from in the usual way (via a .dockercfg file) * Retrieving #mesos modes... Alex: So even if for isntance eerything is in local ConnorDoyle: Yeah. You can use any image up on Dockerhub (the defa

Categories : Docker

Allow more memory when docker build a Dockerfile
Buy a new RAM stick? :) More seriously, you are probably running on a VM? You need to go change the settings of your virtual machine and increase the RAM size. In VirtualBox, it is under Settings -> System -> Motherboard -> Base Memory. By default, Docker has no memory limitation, so if you are out of memory, you need to increase the host's capacity.

Categories : Docker

what is Server error: Status 0 while fetching image layer
Looking at the code that is throwing this error, it seems like you didn't get a response when trying to contact the registry (otherwise the status code would be set to that response). This could happen for a variety of reasons, though a firewall / network issue is the most likely one. Turning on debug logging (on the Docker daemon, which you might have to restart for that to take effect) should

Categories : Docker

How to programmatically monitor if a docker container exited?
psutil seems to do what you want http://pypi.python.org/pypi/psutil From Python import psutil psutil.pids() [1, 2, 3, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 51, 52, 53, 54, 56, 57, 58, 59, 61, 62, 63, 64, 65, 66, 67, 69, 70, 71, 72, 73, 74

Categories : Docker

Docker output of exec command in detach mode
How about removing the -d flag, then you will get the output on stdout. Can use shell redirection and backgrounding on the docker command if needed. I would also remove the '-t' flag unless your Java program specifically needs a tty.

Categories : Docker

Invalid repository name while pulling an image in docker
You might be right. I haven't seen a repository with upper case. try this: $ sudo docker pull https://<registry>/repositories/mxtsit/myswitchXSS In this case, Docker bypasses the Docker Hub. However the security is not guaranteed because there won't be any checksum checks. Currently registry redirects to s3 urls for downloads, going forward all downloads need to be streamed through the

Categories : Docker

Strategies for deciding when to use 'docker run' vs 'docker start' and using the latest version of a given image
I am not familiar with fig but your scenario seems good. Usually, I prefer to kill/delete + run my container instead of playing with start/stop though. That way, if there is a new image available, Docker will use it. This work only for stateless services. As you are using Volumes for persistent data, you could do something like this. Regarding the image update, what about running docker pull <

Categories : Docker

Windows base image for docker
That's, for now, impossible because Mircosoft is willing to implement a docker like behavior but is far away to be launching features like that. see http://blog.docker.com/2014/10/docker-microsoft-partner-distributed-applications/

Categories : Docker

Do I need to build docker image on target machine
As the question has been clarified in comments: I want to know if that is something that you can encounter in everyday work with docker. On top of that should I just pull image on target machine and run it, or do I need to clone my repo and build it? No, this is not a typical scenario encountered when using Docker. Any behavior within Docker responsible for this is likely to be conside

Categories : Docker

Installing Gitlab CI using Docker for the Ci and the Runners, and make it persistent after reboot
I have a way of pointing you in the right direction but im trying to make it myself, hope we both manage to get it up heres my situation. im using coreOS + docker trying to do exactly what youre trying to do, and in coreOS you can setup a service that starts the CI everytime you restart the machine (as well as gitlab and the others) my problem is trying to make that same installation automatic.

Categories : Docker

Insert Docker parent host ip into container's hosts file
The --add-host option is made for this. So, in your docker run command, do something like: docker run --add-host dockerhost:`/sbin/ip route|awk '/default/ { print $3}'` [my container]

Categories : Docker

How to have my docker daemon log print to logfile not to STDOUT?
Unix has a concept of 'redirection', so you can ask stdout to go to a file instead using a command like this: docker -d > my_logfile (you would probably also want to redirect stderr) Now,a more complicated version of this is exactly what the docker service startup script does: start-stop-daemon [...] >> "$DOCKER_LOGFILE" 2>&1 so I'm not sure why you are seeing output to your

Categories : Docker

Deploying web service application using Docker
Unfortunately, I don't see anything in the manifest that would let you specify the login credentials in the manifest spec, but there might be a way to workaround it. You can run startup scripts, so try to create one with #!/bin/sh docker login -u your_user -p yourpassword Then add the startup script to your instance with gcloud compute instances add-metadata yourvmname --metadata-from-file

Categories : Docker

Private network issues with docker
Can you enter in your MongoDB using nsenter or docker exec, and issue some commands such as ip all using nsenter from https://github.com/jpetazzo/nsenter or docker exec if you have a recent version of docker

Categories : Docker

How to allocate 50% CPU resource to docker container?
cpu-shares is a 'relative weight', relative to the default setting of 1024, so if you had two containers running on the same core, you could give them the CPU 50-50 or 80-20 or whatever you wanted by adjusting the numbers. It is an integer. You cannot give an overall limit, as you want to, using this flag, but you can restrict the set of CPUs that the container runs on using --cpuset mentioned h

Categories : Docker

Enabling Remote API in Docker on Mac OS X (boot2docker)
Docker, as configured by Boot2Docker, supports remote access on port 2375 from the host OSX machine by default; this is what is set up when it tells you to do export DOCKER_HOST=tcp://192.168.59.103:2375 If you want to access the port from another machine you need to configure VirtualBox networking to route traffic to that port. This could be done by port forwarding with this command: VBoxManag

Categories : Docker

Virtual Box on Windows while using Docker
Q1: Yes. The Docker Engine uses Linux-specific kernel features, so to run it on Windows we need to use a lightweight virtual machine (vm). Boot2Docker is a lightweight Linux distribution made specifically to run Docker containers. Q2: Yes to the first question mark. No to the second question mark. After installing docker, you can launch a container with a base Ubuntu image. $ sudo docker run -i

Categories : Docker

Docker failing to add remote file with 'too many redirects'
Looks like the error is coming from DNS, and the DNS server is at 10.0.2.3. This is the address that VirtualBox maps for DNS. Very similar question at Docker failed to pull images from registry, with advice to use Google's DNS at 8.8.8.8, which is generally excellent.

Categories : Docker

Access control for private docker registry
You could use any web server with authentication before registry. Here the sample with ngnix. P.S. There is similar question.

Categories : Docker

Capture output from attached docker container
If it is loging functionality you want I wrote this gist with some examples. https://gist.github.com/afolarin/a2ac14231d9079920864 The other thing you might consider if you are using v1.3 is the docker exec command which you can use to insert new processes into a running container.

Categories : Docker

How do I run private docker images on Google Container Engine
You can push your image to Google Container Registry and reference them from your pod manifest. Detailed instructions Assuming you have a DOCKER_HOST properly setup , a GKE cluster running the last version of Kubernetes and Google Cloud SDK installed. Setup some environment variables gcloud components update kubectl gcloud config set project <your-project> gcloud config set compute/zone

Categories : Docker

How to restore snapshot of docker image (for testing purpose, every test on this same docker image)
This is not the docker image you are changing. It's your host file system. The bash redirection you're using '>>' puts the stdout of the docker run command into /tmp/t on your host file system. To restore the state, you need to remove the file. I think what you want is docker run test_base bash -c 'echo test >> /tmp/t' which will put the echo in the container file system, which will b

Categories : Docker

How to patch exsisting images with new images in docker?
If I understood your needs, you can make your changes on the running container, then you commit it (using the same tag the image had previous the changes) then optionally you push the new image to the registry. The new containers you start will contain your changes as the container you have changed.

Categories : Docker

is there a way to negate a pattern in .dockerignore?
The answer to your question (at least today) is no. There is no negation pattern as in .gitignore, where you can exlude a wildcard pattern, but then negate parts of it. Without this (and given their extremely limited matching options), there is simply no practical way to do what you want (unless you feel like piping in a recursive directory listing of all your files into the .dockerignore file,

Categories : Docker

Where do untagged Docker images come from?
Docker uses a file system called AUFS, which stands for Augmented File System. Pretty much each line of a Docker file will create a new image and when you stack or augment them all on top of each other you'll get your final docker image. This is essentially a way of caching, so if you change only the 9th line of your Docker file it wont rebuild the entire image set. (Well depends on what commands

Categories : Docker

Add remote tag to a docker image
The way you've stated, docker tag ...; docker push ... is the best way to add a tag to an image and share it. In the specific example you've given, both tags were in the same repo (myregistry.com/myimage). In this case you can just docker push myregistry.com/myimage and by default the docker daemon will push all the tags for the repo at the same time, saving the iteration over layers for shared l

Categories : Docker




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.