Question: Docker containers and entrypoints - Init scripts which require to be PID 1 #19393
Unanswered
francescocaponio
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
Intro
I started using coder last year and day by day I created several templates based on one or more containers to create complex stacks to develop in node, django or several other environments. Most of them are based on linux containers.
Current setup
I usually run containers that were previously built to run as portainer stacks (docker compose) and translated the compose file to a terraform (based on coder and docker providers) script with the ability to build a docker image when needed during the terraform start command. Of course every time I need to start a new unknown container, I run it in docker, take note of the entrypoint command and run it as a startup_script of the coder agent.
Easy, amazing results!
I have a ubuntu image with XFCE and noVNC, which is really useful to run some GUI based apps remotely.
Problem
Today I discovered selkies, tested it by running the container and I noticed stronger performances when compared to the current VNC server + noVNC solution. Every pre-built image that I found with any window manager and selkies is based on
s6-overlay
, which require to be run as PID 1, but PID 1 is taken by the coder agent run as entrypoint.Question
Is there a way to run the agent called by another script?
If yes, what's the content of the variable
coder_agent.main.init_script
? Is it safe to hardcode it in the docker image build? Or it can evolve in time and having it fixed may create some problems?Anyway, the only allowed startup order is to have the coder script as entrypoint of the docker image and the original entrypoint of the image run by the startup script, like in the following example?
Or actually there are other solutions?
Beta Was this translation helpful? Give feedback.
All reactions