Skip to content

Commit

Permalink
Build container management as a static binary
Browse files Browse the repository at this point in the history
Signed-off-by: Kristiyan Gostev <[email protected]>
  • Loading branch information
k-gostev committed May 30, 2024
1 parent 773995d commit bc93db7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ GO_INSTALL = "${GO_IMPORT}/containerm/daemon \
${GO_IMPORT}/containerm/cli \
"

GO_LINKSHARED = ""
GOBUILDFLAGS:remove = "-buildmode=pie"

require container-management.inc

inherit go-mod
Expand Down
11 changes: 7 additions & 4 deletions recipes-containers/container-management/files/service.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@
Description=Eclipse Kanto - Container Management
Documentation=https://eclipse.org/kanto/docs/
After=network.target containerd.service
Requires=network.target containerd.service
Requires=network.target
Requires=containerd.service

[Service]
Type=simple
ExecStart=@CM_BIN_DD@/container-management --cfg-file @CM_CFG_DD@/container-management/config.json
Environment=HOME=%h
Environment=XDG_CONFIG_HOME=%E
ExecStart=/usr/bin/container-management --cfg-file /etc/container-management/config.json
Restart=always
TimeoutSec=3000
TimeoutSec=300

[Install]
WantedBy=multi-user.target
WantedBy=multi-user.target

0 comments on commit bc93db7

Please sign in to comment.