forked from github-starred/komodo
move skip label to be built into images
This commit is contained in:
@@ -57,6 +57,8 @@ ENV KOMODO_CLI_CONFIG_KEYWORDS="*config.*,*komodo.cli*.*"
|
||||
|
||||
CMD [ "core" ]
|
||||
|
||||
# Label to prevent Komodo from stopping with StopAllContainers
|
||||
LABEL komodo.skip="true"
|
||||
# Label for Ghcr
|
||||
LABEL org.opencontainers.image.source="https://github.com/moghtech/komodo"
|
||||
LABEL org.opencontainers.image.description="Komodo Core"
|
||||
|
||||
@@ -53,6 +53,8 @@ ENV KOMODO_CLI_CONFIG_KEYWORDS="*config.*,*komodo.cli*.*"
|
||||
|
||||
CMD [ "core" ]
|
||||
|
||||
# Label to prevent Komodo from stopping with StopAllContainers
|
||||
LABEL komodo.skip="true"
|
||||
# Label for Ghcr
|
||||
LABEL org.opencontainers.image.source="https://github.com/moghtech/komodo"
|
||||
LABEL org.opencontainers.image.description="Komodo Core"
|
||||
|
||||
@@ -42,6 +42,8 @@ ENV KOMODO_CLI_CONFIG_KEYWORDS="*config.*,*komodo.cli*.*"
|
||||
|
||||
CMD [ "core" ]
|
||||
|
||||
# Label to prevent Komodo from stopping with StopAllContainers
|
||||
LABEL komodo.skip="true"
|
||||
# Label for Ghcr
|
||||
LABEL org.opencontainers.image.source="https://github.com/moghtech/komodo"
|
||||
LABEL org.opencontainers.image.description="Komodo Core"
|
||||
|
||||
@@ -31,6 +31,9 @@ ENV PERIPHERY_PRIVATE_KEY="file:/config/keys/periphery.key"
|
||||
|
||||
CMD [ "periphery" ]
|
||||
|
||||
# Label to prevent Komodo from stopping with StopAllContainers
|
||||
LABEL komodo.skip="true"
|
||||
# Label for ghcr
|
||||
LABEL org.opencontainers.image.source="https://github.com/moghtech/komodo"
|
||||
LABEL org.opencontainers.image.description="Komodo Periphery"
|
||||
LABEL org.opencontainers.image.licenses="GPL-3.0"
|
||||
|
||||
@@ -34,6 +34,9 @@ ENV PERIPHERY_PRIVATE_KEY="file:/config/keys/periphery.key"
|
||||
|
||||
CMD [ "periphery" ]
|
||||
|
||||
# Label to prevent Komodo from stopping with StopAllContainers
|
||||
LABEL komodo.skip="true"
|
||||
# Label for ghcr
|
||||
LABEL org.opencontainers.image.source="https://github.com/moghtech/komodo"
|
||||
LABEL org.opencontainers.image.description="Komodo Periphery"
|
||||
LABEL org.opencontainers.image.licenses="GPL-3.0"
|
||||
|
||||
@@ -23,6 +23,9 @@ ENV PERIPHERY_PRIVATE_KEY="file:/config/keys/periphery.key"
|
||||
|
||||
CMD [ "periphery" ]
|
||||
|
||||
# Label to prevent Komodo from stopping with StopAllContainers
|
||||
LABEL komodo.skip="true"
|
||||
# Label for ghcr
|
||||
LABEL org.opencontainers.image.source="https://github.com/moghtech/komodo"
|
||||
LABEL org.opencontainers.image.description="Komodo Periphery"
|
||||
LABEL org.opencontainers.image.licenses="GPL-3.0"
|
||||
|
||||
@@ -288,7 +288,9 @@ impl Resolve<super::Args> for StartAllContainers {
|
||||
.context("failed to list all containers on host")?;
|
||||
let futures = containers.iter().filter_map(
|
||||
|ContainerListItem { name, labels, .. }| {
|
||||
if labels.contains_key("komodo.skip") {
|
||||
if let Some(skip) = labels.get("komodo.skip")
|
||||
&& skip != "false"
|
||||
{
|
||||
return None;
|
||||
}
|
||||
let command = format!("docker start {name}");
|
||||
@@ -315,7 +317,9 @@ impl Resolve<super::Args> for RestartAllContainers {
|
||||
.context("failed to list all containers on host")?;
|
||||
let futures = containers.iter().filter_map(
|
||||
|ContainerListItem { name, labels, .. }| {
|
||||
if labels.contains_key("komodo.skip") {
|
||||
if let Some(skip) = labels.get("komodo.skip")
|
||||
&& skip != "false"
|
||||
{
|
||||
return None;
|
||||
}
|
||||
let command = format!("docker restart {name}");
|
||||
@@ -342,7 +346,9 @@ impl Resolve<super::Args> for PauseAllContainers {
|
||||
.context("failed to list all containers on host")?;
|
||||
let futures = containers.iter().filter_map(
|
||||
|ContainerListItem { name, labels, .. }| {
|
||||
if labels.contains_key("komodo.skip") {
|
||||
if let Some(skip) = labels.get("komodo.skip")
|
||||
&& skip != "false"
|
||||
{
|
||||
return None;
|
||||
}
|
||||
let command = format!("docker pause {name}");
|
||||
@@ -369,7 +375,9 @@ impl Resolve<super::Args> for UnpauseAllContainers {
|
||||
.context("failed to list all containers on host")?;
|
||||
let futures = containers.iter().filter_map(
|
||||
|ContainerListItem { name, labels, .. }| {
|
||||
if labels.contains_key("komodo.skip") {
|
||||
if let Some(skip) = labels.get("komodo.skip")
|
||||
&& skip != "false"
|
||||
{
|
||||
return None;
|
||||
}
|
||||
let command = format!("docker unpause {name}");
|
||||
@@ -396,7 +404,9 @@ impl Resolve<super::Args> for StopAllContainers {
|
||||
.context("failed to list all containers on host")?;
|
||||
let futures = containers.iter().filter_map(
|
||||
|ContainerListItem { name, labels, .. }| {
|
||||
if labels.contains_key("komodo.skip") {
|
||||
if let Some(skip) = labels.get("komodo.skip")
|
||||
&& skip != "false"
|
||||
{
|
||||
return None;
|
||||
}
|
||||
Some(async move {
|
||||
|
||||
Reference in New Issue
Block a user