Skip to content

Commit 9d6a910

Browse files
committed
chore(monitor): use podman replace docker
1 parent a7ad932 commit 9d6a910

8 files changed

Lines changed: 39 additions & 40 deletions

File tree

.woodpecker/build-linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pipeline:
1212
- name: publish-linux
1313
image: bash
1414
commands:
15-
- echo $CONTAINER_PASSWORD | docker login $DRYCC_REGISTRY --username $CONTAINER_USERNAME --password-stdin > /dev/null 2>&1
15+
- echo $CONTAINER_PASSWORD | podman login $DRYCC_REGISTRY --username $CONTAINER_USERNAME --password-stdin > /dev/null 2>&1
1616
- export VERSION=$([ -z $CI_COMMIT_TAG ] && echo latest || echo $CI_COMMIT_TAG)-$(sed 's#/#-#g' <<< $CI_SYSTEM_ARCH)
1717
- cd grafana && make build-all push-all && cd ..
1818
- cd telegraf && make build-all push-all && cd ..

.woodpecker/manifest-grafana.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pipeline:
1919
- name: publish-manifest
2020
image: bash
2121
commands:
22-
- docker run --rm
22+
- podman run --rm
2323
-e PLUGIN_SPEC=.woodpecker/manifest.tmpl
2424
-e PLUGIN_USERNAME=$CONTAINER_USERNAME
2525
-e PLUGIN_PASSWORD=$CONTAINER_PASSWORD

.woodpecker/manifest-telegraf.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pipeline:
1919
- name: publish-manifest
2020
image: bash
2121
commands:
22-
- docker run --rm
22+
- podman run --rm
2323
-e PLUGIN_SPEC=.woodpecker/manifest.tmpl
2424
-e PLUGIN_USERNAME=$CONTAINER_USERNAME
2525
-e PLUGIN_PASSWORD=$CONTAINER_PASSWORD

default.mk

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
SHELL := /bin/bash
22

33
# all monitor components share/use the following targets/exports
4-
DOCKER_HOST = $(shell echo $$DOCKER_HOST)
54
BUILD_TAG ?= git-$(shell git rev-parse --short HEAD)
65
DRYCC_REGISTRY ?= ${DEV_REGISTRY}
76
IMAGE_PREFIX ?= drycc
@@ -11,33 +10,33 @@ include ../includes.mk
1110
include ../versioning.mk
1211
include ../deploy.mk
1312

14-
TEST_ENV_PREFIX := docker run --rm -v ${CURDIR}:/bash -w /bash ${DEV_REGISTRY}/drycc/go-dev
13+
TEST_ENV_PREFIX := podman run --rm -v ${CURDIR}:/bash -w /bash ${DEV_REGISTRY}/drycc/go-dev
1514

16-
build: docker-build
17-
push: docker-push
18-
deploy: check-kubectl docker-build docker-push install
15+
build: podman-build
16+
push: podman-push
17+
deploy: check-kubectl podman-build podman-push install
1918

20-
docker-build:
21-
docker build ${DOCKER_BUILD_FLAGS} --build-arg CODENAME=${CODENAME} -t ${IMAGE} rootfs
22-
docker tag ${IMAGE} ${MUTABLE_IMAGE}
19+
podman-build:
20+
podman build --build-arg CODENAME=${CODENAME} -t ${IMAGE} rootfs
21+
podman tag ${IMAGE} ${MUTABLE_IMAGE}
2322

24-
docker-buildx:
25-
docker buildx build --build-arg CODENAME=${CODENAME} --platform ${PLATFORM} -t ${IMAGE} rootfs --push
23+
podman-buildx:
24+
podman buildx build --build-arg CODENAME=${CODENAME} --platform ${PLATFORM} -t ${IMAGE} rootfs --push
2625

27-
clean: check-docker
28-
docker rmi $(IMAGE)
26+
clean: check-podman
27+
podman rmi $(IMAGE)
2928

3029
test: test-style
3130

3231
test-style:
3332
${TEST_ENV_PREFIX} shellcheck $(SHELL_SCRIPTS)
3433

35-
.PHONY: build push docker-build clean upgrade deploy test test-style
34+
.PHONY: build push podman-build clean upgrade deploy test test-style
3635

3736
build-all:
38-
docker build ${DOCKER_BUILD_FLAGS} --build-arg CODENAME=${CODENAME} -t ${DRYCC_REGISTRY}/${IMAGE_PREFIX}/grafana:${VERSION} ../grafana/rootfs
39-
docker build ${DOCKER_BUILD_FLAGS} --build-arg CODENAME=${CODENAME} -t ${DRYCC_REGISTRY}/${IMAGE_PREFIX}/telegraf:${VERSION} ../telegraf/rootfs
37+
podman build --build-arg CODENAME=${CODENAME} -t ${DRYCC_REGISTRY}/${IMAGE_PREFIX}/grafana:${VERSION} ../grafana/rootfs
38+
podman build --build-arg CODENAME=${CODENAME} -t ${DRYCC_REGISTRY}/${IMAGE_PREFIX}/telegraf:${VERSION} ../telegraf/rootfs
4039

4140
push-all:
42-
docker push ${DRYCC_REGISTRY}/${IMAGE_PREFIX}/grafana:${VERSION}
43-
docker push ${DRYCC_REGISTRY}/${IMAGE_PREFIX}/telegraf:${VERSION}
41+
podman push ${DRYCC_REGISTRY}/${IMAGE_PREFIX}/grafana:${VERSION}
42+
podman push ${DRYCC_REGISTRY}/${IMAGE_PREFIX}/telegraf:${VERSION}

grafana/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,15 @@ The provided `Makefile` has various targets to help support building and publish
108108
### Environment variables
109109
There are a few key environment variables you should be aware of when interacting with the `make` targets.
110110

111-
* `BUILD_TAG` - The tag provided to the docker image when it is built (defaults to the git-sha)
111+
* `BUILD_TAG` - The tag provided to the podman image when it is built (defaults to the git-sha)
112112
* `SHORT_NAME` - The name of the image (defaults to `grafana`)
113-
* `DRYCC_REGISTRY` - This is the registry you are using (default `dockerhub`)
113+
* `DRYCC_REGISTRY` - This is the registry you are using (default `registry.drycc.cc`)
114114
* `IMAGE_PREFIX` - This is the account for the registry you are using (default `drycc`)
115115

116116
### Make targets
117117

118-
* `make build` - Build docker image
119-
* `make push` - Push docker image to a registry
118+
* `make build` - Build container image
119+
* `make push` - Push container image to a registry
120120
* `make upgrade` - Replaces the running grafana instance with a new one
121121

122122
The typical workflow will look something like this - `DRYCC_REGISTRY= IMAGE_PREFIX=foouser make build push upgrade`

includes.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
.PHONY: check-docker
2-
check-docker:
3-
@if [ -z $$(which docker) ]; then \
4-
echo "Missing \`docker\` client which is required for development"; \
1+
.PHONY: check-podman
2+
check-podman:
3+
@if [ -z $$(which podman) ]; then \
4+
echo "Missing \`podman\` client which is required for development"; \
55
exit 2; \
66
fi
77

telegraf/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# [Telegraf](https://influxdata.com/time-series-platform/telegraf/)
22

33
## Description
4-
Telegraf is a metrics collection daemon from InfluxData. It contains numerous input and output plugins that allows the user to customize what data they collect and where it is sent. This image is based on the official [drycc base image](https://github.com/drycc/docker-base).
4+
Telegraf is a metrics collection daemon from InfluxData. It contains numerous input and output plugins that allows the user to customize what data they collect and where it is sent. This image is based on the official [drycc base image](https://github.com/drycc/base).
55

66
## Configuration
77
Telegraf configuration is based largely on a toml file that is passed in when the binary starts. The issue with doing this in a containerized environment is how can you "dynamically" build this file based on values passed into the container at runtime. Therefore, this image relies on a project called [envtpl](https://github.com/arschles/envtpl) to produce the telegraf configuration file. It can take environment variables and through using go templates produce the necessary stanzas in the toml file to start telegraf. Currently, the go template only supports basic if checks and outputting values that have been set.
@@ -29,15 +29,15 @@ The provided `Makefile` has various targets to help support building and publish
2929
### Environment variables
3030
There are a few key environment variables you should be aware of when interacting with the `make` targets.
3131

32-
* `BUILD_TAG` - The tag provided to the docker image when it is built (defaults to the git-sha)
32+
* `BUILD_TAG` - The tag provided to the container image when it is built (defaults to the git-sha)
3333
* `SHORT_NAME` - The name of the image (defaults to `grafana`)
3434
* `DRYCC_REGISTRY` - This is the registry you are using (default `dockerhub`)
3535
* `IMAGE_PREFIX` - This is the account for the registry you are using (default `drycc`)
3636

3737
### Make targets
3838

39-
* `make build` - Build docker image
40-
* `make push` - Push docker image to a registry
39+
* `make build` - Build container image
40+
* `make push` - Push container image to a registry
4141
* `make upgrade` - Replaces the running grafana instance with a new one
4242

4343
The typical workflow will look something like this - `DRYCC_REGISTRY= IMAGE_PREFIX=foouser make build push upgrade``

versioning.mk

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ info:
1010
@echo "Immutable tag: ${IMAGE}"
1111
@echo "Mutable tag: ${MUTABLE_IMAGE}"
1212

13-
.PHONY: docker-push
14-
docker-push: docker-mutable-push docker-immutable-push
13+
.PHONY: podman-push
14+
podman-push: podman-mutable-push podman-immutable-push
1515

16-
.PHONY: docker-immutable-push
17-
docker-immutable-push:
18-
docker push ${IMAGE}
16+
.PHONY: podman-immutable-push
17+
podman-immutable-push:
18+
podman push ${IMAGE}
1919

20-
.PHONY: docker-mutable-push
21-
docker-mutable-push:
22-
docker push ${MUTABLE_IMAGE}
20+
.PHONY: podman-mutable-push
21+
podman-mutable-push:
22+
podman push ${MUTABLE_IMAGE}

0 commit comments

Comments
 (0)