question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[question] Possible to run Containerpilot (or other init processes) as entrypoint?

See original GitHub issue

Description of the issue:

Consul is useful in service discovery, and rather than running something like Registrator as a sidecar to the application, would it be possible to add ContainerPilot that is ran within the container as a type of init system (other examples for non service discovery would be s6 or tini)?

I pick those because I think they have little dependencies. I’m leaving supervisord out of the list because that requires Python, IIUC (although, that can be added with one’s own base image)

Expected behavior:

  • Install containerpilot into image (for simplicity, let’s say the base image has it), or better - Can Jib do multistage builds yet?

It is a statically linked binary, written in go

# get ContainerPilot release
RUN curl -Lo /tmp/cb.tar.gz https://github.com/joyent/containerpilot... \
    && tar -xz -f /tmp/cb.tar.gz && mv /containerpilot /bin/
  • contiainerpilot.json can be added into src/main/jib/app

  • ENV CONTAINERPILOT=file:///app/containerpilot.json can be put into the build system

  • Question: Is this possible?

ENTRYPOINT ["/bin/containerpilot"]
CMD ["java", "-cp" ...jibStuff...]

Or even with a custom entrypoint, are the JVM args exposed to a custom entrypoint script?

I’m leaning towards the thought a custom entrypoint is required to run the config templating command i.e./bin/containerpilot -config /app/containerpilot.json5

Additional Information: Feel free to ask. Disclaimer - I have only done a few projects with Containerpilot, but it is required for our containers to work “properly” in our environment and I just copy paste from others’ code. At a high level, I think the above are the only steps required.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
OneCricketeercommented, May 7, 2019

So, to summarize this, I got

  1. Use a base image that makes sense
  2. Feel free to script in extra tasks using Gradle/Maven, as see fit.

we did have an internal discussion around whether we would support accepting a ZIP or TAR as part of “extraDirectories”, and in that sense, it might make sense to specify a remote ZIP URL

Well, that would be similar to the ADD semantics in Dockerfile. Might be useful ¯\_(ツ)_/¯.

0reactions
chanseokohcommented, Dec 7, 2018

Okay, I think we can close this issue, for the purpose of tracking open issues. Feel free to reopen if you have questions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using the Autopilot pattern to deploy container resources at a ...
ContainerPilot is a software package that implements the Autopilot pattern; in effect, it runs as the init process of a container, and as...
Read more >
autopilotpattern/general - Gitter
I want something like: if $FIRSTRUN; then containerpilot app -param1 -param2 -paraminit else containerpilot app -param1 -param2 fi. Tim Gross. @tgross.
Read more >
Self-Organizing Microservices - Evaluating ContainerPilot on ...
For this simple idea to work, the agent must be embedded inside each container, and start as the first process in the container...
Read more >
Best way to run multiple processes, best init system for Docker?
Yes I'm aware Docker is designed to be used for single process containers. But this isn't always practical and won't fly for is...
Read more >
Containers and microservices and Node.js! Oh, my! | Joyent
The hub requires a custom Smart Application to be running that will ... ContainerPilot behaves as an init process should, and therefore is ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found