Tag: bash

Script fails at build but works from Docker container

I am trying to run unit tests through Docker for a directory monitor which reacts to file and directory creation, movement and renaming. Here is the script : #/bin/bash # Launch Redis server redis-server –daemonize yes # Start directory_observer python /test/directory_observer/src/directory_observer.py –config=/test/directory_observer/tests/directory_observer.ini & # Execute test script (operations in the folders) bash /test/directory_observer/tests/Dockerfile_testing/directory_observer_test_cases.sh # Run […]

How do I run nginx -t when nginx is running inside a docker container? [duplicate]

This question already has an answer here: How do I run a command on an already existing Docker container? 11 answers

permission denied error in docker

I create the docker image but I am trying to give a parameter to the docker image but I am getting an permission denied error on my entry.sh file. Docker File: FROM ubuntu MAINTAINER ravat RUN mkdir -p /home/ravata/Desktop/DockerDemo/ RUN echo “Hello Apache server on Ubuntu Docker” > /home/ravata/Desktop/DockerDemo/index.html COPY entry.sh . CMD /bin/bash entry.sh […]

Accessing a MySql database from external IP (Docker containers)

Using Docker containers, I am trying to access a MySQL Docker container (https://hub.docker.com/_/mysql/) from other containers. To do that, I’ve been using the PhpMyAdmin docker container (https://hub.docker.com/r/phpmyadmin/phpmyadmin/) which is the most simple way to view mysql databases. Access denied However… my phpmyadmin container cannot connect to the mysql container, giving the following error : #1045 […]

Does runit reap orphan processes?

I am writing a small Docker container based on Phusion baseimage which provides runit out of the box. I put Cassandra and Opscenter agent in my container. Both are started as service under /etc/service (as in the doc). This blog post mentions that my_init would collect zombie processes, but is vague about what it does […]

How to transfer a environment variable into a dockerfile

How can I transfer a environment variable into the dockerfile? The variable is dynamic, so I can not use ENV to do that. like $( dirname “${BASH_SOURCE[0]}” ) is the way to tell where a bash script locate. How can a Dockerfile tell which path it locate?

bash: child setpgid (5870 to 5870): No such process on docker

root@arch:/ 19:27:32 # docker run -t -i ubuntu /bin/bash root@74b77bf42943:/# ls bash: child setpgid (5870 to 5870): No such process bin dev home lib64 mnt proc run srv tmp var boot etc lib media opt root sbin sys usr root@74b77bf42943:/# uname -a bash: child setpgid (5935 to 5935): No such process Linux 74b77bf42943 3.15.3-1-ck #1 […]

Docker cannot run on build when running container with a different user

I don’t know the specifics why the node application does not run. Basically I added a dockerfile in a nodejs app, and here is my Dockerfile FROM node:0.10-onbuild RUN mv /usr/src/app /ghost && useradd ghost –home /ghost && \ cd /ghost ENV NODE_ENV production VOLUME [“/ghost/content”] WORKDIR /ghost EXPOSE 2368 CMD [“bash”, “start.bash”] Where start.bash […]

How can I setup monitoring of Docker Container from Nagios

I am trying to set up a monitoring of docker container from the nagios.My nagios is on one VM and my docker is on another VM . So to monitor docker I am trying to use the shell script below: #!/bin/bash # Author: Erik Kristensen # Email: erik@erikkristensen.com # License: MIT # Nagios Usage: check_nrpe!check_docker_container!_container_id_ […]

Syntax issue with adding creating a mongodb and user with roles

I’ve started building my first docker container for a mongodb with auth. I have a python script that fetches credentials from our password safe and makes them available for a bash script which then sets up the admin db and users. I use a RUN command for the python script and that is fine. The […]

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