Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Ship Cat container manager
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wizards
Ship Cat container manager
Commits
8d0b44e9
Commit
8d0b44e9
authored
1 year ago
by
Martin Mareš
Browse files
Options
Downloads
Patches
Plain Diff
Add podman_create_options to container config
parent
eff16c69
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
debian/changelog
+6
-0
6 additions, 0 deletions
debian/changelog
etc/container.toml.example
+3
-0
3 additions, 0 deletions
etc/container.toml.example
shipcat/config.py
+3
-1
3 additions, 1 deletion
shipcat/config.py
shipcat/main.py
+1
-2
1 addition, 2 deletions
shipcat/main.py
with
13 additions
and
3 deletions
debian/changelog
+
6
−
0
View file @
8d0b44e9
kam-shipcat (0.9.1) unstable; urgency=medium
* Added podman_create_options.
-- Martin Mares <mj@ucw.cz> Tue, 18 Jun 2024 10:46:23 +0200
kam-shipcat (0.9) unstable; urgency=medium
* Initial release.
...
...
This diff is collapsed.
Click to expand it.
etc/container.toml.example
+
3
−
0
View file @
8d0b44e9
...
...
@@ -12,3 +12,6 @@ allowed_groups = []
# Do we re-create the container on every start?
create_on_start = false
# Extra options passed to "podman create"
podman_create_options = []
This diff is collapsed.
Click to expand it.
shipcat/config.py
+
3
−
1
View file @
8d0b44e9
...
...
@@ -6,7 +6,7 @@ from grp import getgrnam
from
pathlib
import
Path
import
re
import
tomllib
from
typing
import
Set
from
typing
import
Set
,
List
from
.json_walker
import
Walker
,
WalkerError
...
...
@@ -58,6 +58,7 @@ class ContainerConfig:
allowed_groups
:
Set
[
int
]
create_on_start
:
bool
global_config
:
GlobalConfig
podman_create_options
:
List
[
str
]
# Automatically generated
pid_file
:
str
...
...
@@ -118,6 +119,7 @@ class ContainerConfig:
self
.
allowed_groups
.
add
(
grp
.
gr_gid
)
self
.
create_on_start
=
w
[
'
create_on_start
'
].
as_bool
(
self
.
global_config
.
default_create_on_start
)
self
.
podman_create_options
=
[
o
.
as_str
()
for
o
in
w
[
'
podman_create_options
'
].
default_to
([]).
array_values
()]
self
.
pid_file
=
f
'
/run/shc/
{
self
.
name
}
.pid
'
self
.
user_name
=
self
.
name
...
...
This diff is collapsed.
Click to expand it.
shipcat/main.py
+
1
−
2
View file @
8d0b44e9
...
...
@@ -226,8 +226,7 @@ def create_container(cc: ContainerConfig) -> None:
'
--ip
'
,
ip
,
'
--subuidname
'
,
cc
.
user_name
,
'
--subgidname
'
,
cc
.
user_name
,
cc
.
image
,
],
]
+
cc
.
podman_create_options
+
[
cc
.
image
]
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment