Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Code-server, podman, systemd, quadlets, socket #7073

Answered by code-asher
EvVlF asked this question in Q&A
Discussion options

Hi. I made a service using podman and systemd via quadlets. But I still have a question about one technology. I wanted to make the container run only when I access the service, for example when I go to myvps.dot/service1. After that the container/service was supposed to start. After some time of not using - the container would stop without using resources. To implement this there are two options from
https://github.com/containers/podman/blob/main/docs/tutorials/socket_activation.md
In the first case, as far as I understand, there is a limit on the number of container starts - so you can start only 1 container/service.
I went the second way. But it requires that the project initially supports this (socket activation of containers).

So I have a question: does the code-server project support this or am I setting something wrong?

You must be logged in to vote

If I understand correctly, this meant to start/stop a container on demand? From my brief reading it seems like it would be possible to do:

systemd-socket-activate -l 8080 podman run --rm --network=none codercom/code-server

But I am not sure.

To answer your question, no, we do not have any kind of socket activation. We do have a wrapper that only starts VS Code processes when we get the first HTTP request though.

Replies: 1 comment 1 reply

Comment options

If I understand correctly, this meant to start/stop a container on demand? From my brief reading it seems like it would be possible to do:

systemd-socket-activate -l 8080 podman run --rm --network=none codercom/code-server

But I am not sure.

To answer your question, no, we do not have any kind of socket activation. We do have a wrapper that only starts VS Code processes when we get the first HTTP request though.

You must be logged in to vote
1 reply
Comment options

Thank you! This information was really important to me!

Answer selected by EvVlF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants

AltStyle によって変換されたページ (->オリジナル) /