#docker (2019-10)
All things docker
Archive: https://archive.sweetops.com/docker/
2019-10-01
![Igor avatar](https://avatars.slack-edge.com/2022-03-17/3244104166391_48a8db73944f03735a65_72.jpg)
@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?
![Igor avatar](https://avatars.slack-edge.com/2022-03-17/3244104166391_48a8db73944f03735a65_72.jpg)
When I -it into it as root as su as node, everything works fine
![Igor avatar](https://avatars.slack-edge.com/2022-03-17/3244104166391_48a8db73944f03735a65_72.jpg)
node user has permissions and can run entrypoint and cmd
![Nikola Velkovski avatar](https://avatars.slack-edge.com/2018-11-08/474538495603_cc9e62a39b3dbc9d8d65_72.png)
@Igor that is weird indeed, I am usually using debian and alpine, and I haven’t encountered similar issues.
![Nikola Velkovski avatar](https://avatars.slack-edge.com/2018-11-08/474538495603_cc9e62a39b3dbc9d8d65_72.png)
The only thing I can think of is a MAC software
![Nikola Velkovski avatar](https://avatars.slack-edge.com/2018-11-08/474538495603_cc9e62a39b3dbc9d8d65_72.png)
apparmor, SElinux or grsecurity
![Nikola Velkovski avatar](https://avatars.slack-edge.com/2018-11-08/474538495603_cc9e62a39b3dbc9d8d65_72.png)
on the host that runs the dockers
![Igor avatar](https://avatars.slack-edge.com/2022-03-17/3244104166391_48a8db73944f03735a65_72.jpg)
disabled everything selinux, but maybe one of the others
![Igor avatar](https://avatars.slack-edge.com/2022-03-17/3244104166391_48a8db73944f03735a65_72.jpg)
It’s a hardened host
![Nikola Velkovski avatar](https://avatars.slack-edge.com/2018-11-08/474538495603_cc9e62a39b3dbc9d8d65_72.png)
but wait there was one aditional step…
![Igor avatar](https://avatars.slack-edge.com/2022-03-17/3244104166391_48a8db73944f03735a65_72.jpg)
And I have no visibility atm on how it was setup
![Nikola Velkovski avatar](https://avatars.slack-edge.com/2018-11-08/474538495603_cc9e62a39b3dbc9d8d65_72.png)
you need to disable it
![Nikola Velkovski avatar](https://avatars.slack-edge.com/2018-11-08/474538495603_cc9e62a39b3dbc9d8d65_72.png)
and then either reboot or restart the service..
![Nikola Velkovski avatar](https://avatars.slack-edge.com/2018-11-08/474538495603_cc9e62a39b3dbc9d8d65_72.png)
what was it..
![Nikola Velkovski avatar](https://avatars.slack-edge.com/2018-11-08/474538495603_cc9e62a39b3dbc9d8d65_72.png)
<thinking>
![Igor avatar](https://avatars.slack-edge.com/2022-03-17/3244104166391_48a8db73944f03735a65_72.jpg)
Yup, done that, thanks for your input on this
![Igor avatar](https://avatars.slack-edge.com/2022-03-17/3244104166391_48a8db73944f03735a65_72.jpg)
Just annoying that there is nothing but a single exec user process caused "permission denied"
error
![Igor avatar](https://avatars.slack-edge.com/2022-03-17/3244104166391_48a8db73944f03735a65_72.jpg)
I thought the purpose of docker was to avoid this kind of nonsense
![Nikola Velkovski avatar](https://avatars.slack-edge.com/2018-11-08/474538495603_cc9e62a39b3dbc9d8d65_72.png)
haha you wish
![Nikola Velkovski avatar](https://avatars.slack-edge.com/2018-11-08/474538495603_cc9e62a39b3dbc9d8d65_72.png)
it should be the other way around, SElinux is in place just to annoy the hell out of you
2019-10-15
![Igor avatar](https://avatars.slack-edge.com/2022-03-17/3244104166391_48a8db73944f03735a65_72.jpg)
Our system status page is a real-time view of the performance and uptime of Docker products and services.
![Igor avatar](https://avatars.slack-edge.com/2022-03-17/3244104166391_48a8db73944f03735a65_72.jpg)
Brought down our whole CI/CD in CircleCI. Looks like there is no out-of-the-box redundancy for when the hub is down.
![Mithra avatar](https://secure.gravatar.com/avatar/f95b70a7a724b4ad40e1ee9167919478.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0006-72.png)
Hello can some one help me to Create a docker file with environment variables such as (production, QA ) in JSON.
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
what do you mean by in JSON
?
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
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…
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
you can provide a file with ENV vars
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
docker run -i --rm --env-file example.env
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
but those are key-value pairs
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
you can stringify a JSON object into a string, and then provide it as value to an ENV var
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
and then in the app, decode the JSON string into a JSON object
![Mithra avatar](https://secure.gravatar.com/avatar/f95b70a7a724b4ad40e1ee9167919478.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0006-72.png)
Thanks
![tolstikov avatar](https://avatars.slack-edge.com/2018-09-20/439670551077_0515c2a106a4f3ca0ff6_72.jpg)
you can also use tools like jq, gomplate to extract some data from JSON in any format you need
2019-10-16
![Mithra avatar](https://secure.gravatar.com/avatar/f95b70a7a724b4ad40e1ee9167919478.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0006-72.png)
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.
![Mithra avatar](https://secure.gravatar.com/avatar/f95b70a7a724b4ad40e1ee9167919478.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0006-72.png)
So that the variables has to pick up Dynamically.
2019-10-17
2019-10-22
![Matt Gowie avatar](https://avatars.slack-edge.com/2023-02-06/4762019351860_44dadfaff89f62cba646_72.jpg)
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 ENTRYPOINT
is ./start-backend.sh
.
What am I missing?
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
if the process inside a docker container exits for any reason, the container exits
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
your server prob is incorrectly configured so it does not listen on a port, or it throws an error and exists
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
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
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
without -it
![Matt Gowie avatar](https://avatars.slack-edge.com/2023-02-06/4762019351860_44dadfaff89f62cba646_72.jpg)
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.
With -it
the Jetty Server continues to run and I can hit 8080
via my browser.
![Matt Gowie avatar](https://avatars.slack-edge.com/2023-02-06/4762019351860_44dadfaff89f62cba646_72.jpg)
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.
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
something is wrong with the server config, it should not start and then stop right away
![Matt Gowie avatar](https://avatars.slack-edge.com/2023-02-06/4762019351860_44dadfaff89f62cba646_72.jpg)
@Andriy Knysh (Cloud Posse) Hm, gotcha. I will try figuring that out.
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
(check if the port is not taken by other processes)
![Matt Gowie avatar](https://avatars.slack-edge.com/2023-02-06/4762019351860_44dadfaff89f62cba646_72.jpg)
Will do. Thanks for the quick info @Andriy Knysh (Cloud Posse)
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
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
2019-10-23
![Nikola Velkovski avatar](https://avatars.slack-edge.com/2018-11-08/474538495603_cc9e62a39b3dbc9d8d65_72.png)
Static scanning for software vulnerabilities in container images.
![maarten avatar](https://avatars.slack-edge.com/2020-09-28/1393040065826_b0d13cfde15deff02026_72.png)
Static scanning for software vulnerabilities in container images.
![Maciek Strömich avatar](https://secure.gravatar.com/avatar/98de12365b633b063e208220100d4594.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0002-72.png)
Clair FTW!
![tamsky avatar](https://avatars.slack-edge.com/2019-10-31/817094217669_6e765cea39b456597957_72.jpg)
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…
![joshmyers avatar](https://avatars.slack-edge.com/2018-11-20/483958217281_8117d6f6c62807ce9912_72.jpg)
Holy crap! Amazing!
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…
![tamsky avatar](https://avatars.slack-edge.com/2019-10-31/817094217669_6e765cea39b456597957_72.jpg)
@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.
![Erik Osterman (Cloud Posse) avatar](https://secure.gravatar.com/avatar/88c480d4f73b813904e00a5695a454cb.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0023-72.png)
Looks good to me
![Erik Osterman (Cloud Posse) avatar](https://secure.gravatar.com/avatar/88c480d4f73b813904e00a5695a454cb.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0023-72.png)
I will check for edge cases
![tamsky avatar](https://avatars.slack-edge.com/2019-10-31/817094217669_6e765cea39b456597957_72.jpg)
I’m wondering how it behaves on non-Edge D4M releases
2019-10-25
![Mithra avatar](https://secure.gravatar.com/avatar/f95b70a7a724b4ad40e1ee9167919478.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0006-72.png)
Hello How to pass ENV file in docker ?
![roth.andy avatar](https://avatars.slack-edge.com/2019-09-18/753707271651_6f58c1cbab3c77754f58_72.jpg)
docker run -it --rm -e SOME_ENV=foo ubuntu:latest bash
# echo $SOME_ENV
foo
![Ruan Arcega avatar](https://avatars.slack-edge.com/2019-06-28/682016987190_83da81f915037f35f3ec_72.png)
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
![Erik Osterman (Cloud Posse) avatar](https://secure.gravatar.com/avatar/88c480d4f73b813904e00a5695a454cb.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0023-72.png)
Or just use the env file argument
![Erik Osterman (Cloud Posse) avatar](https://secure.gravatar.com/avatar/88c480d4f73b813904e00a5695a454cb.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0023-72.png)
![Ruan Arcega avatar](https://avatars.slack-edge.com/2019-06-28/682016987190_83da81f915037f35f3ec_72.png)
good point
![jaydip189 avatar](https://secure.gravatar.com/avatar/0617a59c2a9ed20f5cdc1c9712f40af9.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0011-72.png)
how to pass multiple environment variables and multiple values in dockerfile
![roth.andy avatar](https://avatars.slack-edge.com/2019-09-18/753707271651_6f58c1cbab3c77754f58_72.jpg)
RTFM
![roth.andy avatar](https://avatars.slack-edge.com/2019-09-18/753707271651_6f58c1cbab3c77754f58_72.jpg)
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…