Tag: bash

How to restart a Celery Worker in Airflow

I’m currently running into an issue where my Celery worker freezes once in a while and needs to be restarted. I have an instance of Airflow from which I would like to configure and schedule a restart using the BashOperator or SSHOperator, but I’m not sure how to proceed since it’s in a Docker container. […]

Automate process during docker push

Can I add a hook that runs whenever I do a docker push? I’m using docker for the first time, I have installed CLAIRCTL and I have success doing statics analysis by analyzing images manually and generating reports, but I want that to be automatic. How can I do an automatic process to analyze all […]

docker behind proxy doesn't use system proxy info

I have installed docker and it wasn’t working even though proxy was setup. Our corporate proxy requires username:password@proxy.I was using bash script to set proxy when needed. It asks me username:password and sets up proxy for the session. I went through https://docs.docker.com/engine/admin/systemd/#httphttps-proxy Docker proxy setup wants me to hard-code my user and pass info. How […]

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 will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.