Tag: ubuntu

exec not found using Dockerfile ENTRYPOINT

Reading up on the Dockerfile documentation for ENTRYPOINT, I am having an issue trying to rewrite one of my commands: As it runs today, without issues: # Startup ENTRYPOINT [“/etc/init.d/hook”, “/run/apache2/apache2.pid”, “/etc/init.d/apache2 start”] According to various sources, I should fork my hook process using exec, so I have simple changed the entrypoint to ENTRYPOINT [“exec”, […]

Delete file inside docker container using java

I have below code: public static void main(String args[]) { try{ String[] arguments = new String[] {“rm”,”-rf”, “/home/test1″}; Process proc = new ProcessBuilder(arguments).start(); }catch(Exception e){ System.out.println(e.getMessage()); } } I am copying this file inside docker container named “java-project” and compiling/executing it using this command: docker exec -i java-project bash -c “cd /tmp; cat > $1.java;javac […]

Cannot remove all containers in a row

I started yesterday to use Docker and I unfortunately created a ton of containers. Now I want to delete all of them. It would be really boring to delete them one by one because I have like 45 containers with no tag. I found that I should use do delete all of them with one […]

Docker-Cloud “own node” doesn't connect (ubuntu server)

I’ve tried to connect my vps Server with the dockercloud-agent, but I am not able to get it running. I’ve tried multiple Ubuntu-Server versions (14.05, 15.05, and 16.xx) docker is installed, the cloud.docker script execuded. On startup I get “deploying” on the docker-cloud Dasboard, but it always fails. This is the log output: Bringing your […]

docker-compose build error ubuntu mango

Docker-newbie here… I’m tracking down a docker-compose build error for the pango gem. One of the checks shown in the mkmf.log file is: have_package: checking for pango version (>= 1.14.0)… ——————– no I have pango 3.1.0 installed so the result should be “yes”, But I’m wondering if the syntax of “have_package” should have a <= […]

Shell script: Remove hello world docker container without knowing ID

I’m running hello world docker container in a shell script: #!/bin/bash sudo docker run hello-world I’m doing this to verify if the installation of docker was correct. After this I would like to remove this container again. But as I don’t know the ID of this new container I can’t remove it: sudo docker rm […]

Can I copy the docker qcow2 file from an ubuntu server to my mac?

I have an ubuntu server where I installed docker to run some containers. I want to move everything to my Mac so I don’t depend on the ubuntu server. Will it work if I copy the qcow2 file from the server to my Mac?

Docker image dns probem, name solve failed

When I run a latest ubuntu image as a container, its apt-get update failed. It showed me a “Temporary failure resovling ‘archive.ubuntu.com’”. Then i tried the solution as below echo “ archive.ubuntu.com” >> /etc/hosts But this can only work for “archive.ubuntu.com” and only for once, it cannot solve other name solve. If i want the […]

How to properly run a Docker container as a specific host user with the same groups?

My goal is to execute commands in a container using an arbitrary user ID (using the -u flag to docker run), and making the container-environment “believe” that the executing user has the same group-membership as the same user on the host machine. The group-membership is important, because I’d like to be able to execute docker […]

Blocking of docker-compose up on ubuntu 16.04

I am trying to automate the lauching of my containers with docker-compose. “Docker build” and “docker-compose build” are successfully completed but I have a problem when I launch “docker-compose up”. Indeed, the process works fine until it arrives to this line (in the mysql container) : mysql_1 | Version: ‘5.7.17’ socket: ‘/var/run/mysqld/mysqld.sock’ port: 3306 MySQL […]

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.