John Somen

1

votes
0

answer
67

views

Is it possible to exclude service access within the same Docker network?

I am using the nginx-proxy image (https://github.com/jwilder/nginx-proxy) to automatically configure nginx proxy in front of my services. The corresponding nginx-proxy container is running in the nginx-proxy network: docker network create nginx-proxy docker run -d -p 80:80 --network nginx-proxy -v /...
John Somen
1

votes
0

answer
92

views

How can I write this as CMD [ … ] syntax?

It's good practice to start the service with CMD ['/go/bin/myapp'] instead of CMD /go/bin/myapp In the first way, SIGTERMs are caught by the applicaiton, while in the second way, they are caught by the underlying /bin/sh script, which does not forward them to the service. I learned this from https:/...
John Somen
1

votes
2

answer
271

views

Will the application run as PID 1 and will signals be received if we bootstrap it in a entrypoint.sh?

It's good practice to start the service with CMD ['/go/bin/myapp'] instead of CMD /go/bin/myapp In the first way, SIGTERMs are caught by the applicaiton, while in the second way, they are caught by the underlying /bin/sh script, which does not forward them to the service. I learned this from https:/...
John Somen
3

votes
0

answer
27

views

Is it possible to flag a container that it should restart when another container is restarted?

I am using docker-compose to deploy a project which contains about 15 containers. I would like to configure that container b must be restarted whenever container a is restarted. Is that possible to configure in docker-compose.yml? I have been going through the docs, but I cannot find anything useful...
John Somen
1

votes
2

answer
61

views

Why does “sleep 99999999 & sleep 10 & sleep 15” not sleep forever?

Why does the following shell command not sleep forever? I expected that the first sleep 9999999999 is executed in the foreground and that both subsequentsleep's are executed in the background. sleep 9999999999 & sleep 10 & sleep 15 This does not seem to be the case. How can I have the first sleep in...
John Somen
2

votes
1

answer
525

views

Do we need to clean-up in a multi-stage build?

It is a good idea to clean-up resources after installing in a Dockerfile: FROM ubuntu:trusty RUN \ apt-get update \ && apt-get -y install gettext-base \ && && apt-get clean \
John Somen
2

votes
1

answer
506

views

Why does CTRL-C no longer stop my nginx container anymore?

I am experimenting with a nginx-based Dockerfile. The last line currently looks like this: FROM nginx:alpine ... # not really relevant CMD /bin/sh -c 'envsubst < /etc/nginx/conf.d/site.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'' Now when I run the container with docker run m...
John Somen