All things docker
@Nikola Velkovski Thanks for that. What puzzles me is that the container works on other hosts. At which point do permissions of the user within the container get constrained by the host permissions?
When I -it into it as root as su as node, everything works fine
node user has permissions and can run entrypoint and cmd
@Igor that is weird indeed, I am usually using debian and alpine, and I haven’t encountered similar issues.
The only thing I can think of is a MAC software
apparmor, SElinux or grsecurity
on the host that runs the dockers
disabled everything selinux, but maybe one of the others
It’s a hardened host
but wait there was one aditional step…
And I have no visibility atm on how it was setup
you need to disable it
and then either reboot or restart the service..
what was it..
Yup, done that, thanks for your input on this
Just annoying that there is nothing but a single
exec user process caused "permission denied" error
I thought the purpose of docker was to avoid this kind of nonsense
haha you wish
it should be the other way around, SElinux is in place just to annoy the hell out of you
Brought down our whole CI/CD in CircleCI. Looks like there is no out-of-the-box redundancy for when the hub is down.
Hello can some one help me to Create a docker file with environment variables such as (production, QA ) in JSON.
what do you mean by
There are multiple parts of Compose that deal with environment variables in one sense or another. This page should help you find the information you need. Substitute environment variables in…
you can provide a file with ENV vars
docker run -i --rm --env-file example.env
but those are key-value pairs
you can stringify a JSON object into a string, and then provide it as value to an ENV var
and then in the app, decode the JSON string into a JSON object
you can also use tools like jq, gomplate to extract some data from JSON in any format you need
For now I want to set up the Environment variables (Dev, Stage or Test and Production) in a single docker file instead of creating env variables for each environment. All I need is to get those environment variables in a single docker file and deploy through web application in azure portal. Please help me up on it.
So that the variables has to pick up Dynamically.
Hey folks — I have a Docker container running in EBS. It starts up fine, but then immediately exits. This happens locally too, but if I make the docker container run in interactive by passing
-it then it stays up until I make any keypress on my terminal window. I don’t believe I can pass
-it to EBS (or even if I could that I would want to). But what do I need to do to keep that Docker container running since it’s starting up without errors? It’s a Java Jetty Server and I am invoking the java process via a script — i.e. my
What am I missing?
if the process inside a docker container exits for any reason, the container exits
your server prob is incorrectly configured so it does not listen on a port, or it throws an error and exists
if the server is configured correctly and it listens on a port, then when you start the container locally and do port binding, you’d be able to access the web server in a browser on the local computer
Huh — The server does bind to a port. If I startup locally without
-it it does the following:
Oct-21-2019 4:21:21.558 PM EDT [main] INFO JettyServer:185  Starting server on 0.0.0.0:8080... Oct-21-2019 4:21:21.878 PM EDT [main] INFO JettyServer:190  Server started. Oct-21-2019 4:21:21.949 PM EDT [Thread-9] INFO JettyServer:202  Stopping server... Oct-21-2019 4:21:21.986 PM EDT [Thread-9] INFO App:94  Shutting down... Oct-21-2019 4:21:22.576 PM EDT [Thread-9] DEBUG App:135  Shutdown complete.
-it the Jetty Server continues to run and I can hit
8080 via my browser.
Didn’t find this before, but it seems some folks add
&& tail -f /dev/null to their entrypoint or server startup process to keep it running. That sucks though as now the container isn’t monitoring the actual server process.
something is wrong with the server config, it should not start and then stop right away
@Andriy Knysh (Cloud Posse) Hm, gotcha. I will try figuring that out.
(check if the port is not taken by other processes)
Will do. Thanks for the quick info @Andriy Knysh (Cloud Posse)
also looks like the server is starting on the main thread, but stopped on another thread. Could be something about maven/jetty config to wait for the forked child process https://www.eclipse.org/jetty/documentation/current/jetty-maven-plugin.html
Docker Desktop now allows users to access the [OSX] host’s SSH agent inside containers. Fixes docker/for-mac#410
This page contains information about Docker Desktop Edge releases. Edge releases give you early access to our newest features. Note that some of the features may be experimental, and some…
@Erik Osterman (Cloud Posse) https://github.com/cloudposse/geodesic/pull/534 to support this.
Not sure of all the edge cases on this, but maybe you can guide me?
Newly available on Docker for Mac (Edge) release. https://docs.docker.com/docker-for-mac/edge-release-notes/ Someone should test that this doesn’t break on non-Edge Docker-for-Mac releases.
Looks good to me
I will check for edge cases
I’m wondering how it behaves on non-Edge D4M releases
Hello How to pass ENV file in docker ?
docker run -it --rm -e SOME_ENV=foo ubuntu:latest bash # echo $SOME_ENV foo
in dockerfile you can specify the ENV settings example:
from ubuntu ENV TEST=123 ...
this settings will export the TEST environment variable in your cointainer
Or just use the env file argument
how to pass multiple environment variables and multiple values in dockerfile
Dockerfile reference Docker can build images automatically by reading the instructions from a Dockerfile. A Dockerfile is a text document that contains all the commands a user could call on…