Skip to content

Commit ae20cf6

Browse files
Merge pull request #207 from ashcrow/podman
*: use podman instead of docker
2 parents 77cc46f + c234fc3 commit ae20cf6

File tree

13 files changed

+28
-32
lines changed

13 files changed

+28
-32
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ These instructions can be used for AWS:
1818
bazel build tarball
1919
```
2020

21-
*Note*: the project can optionally be built without installing Bazel, provided Docker is installed:
21+
*Note*: the project can optionally be built without installing Bazel, provided Podman is installed:
2222
```sh
23-
docker run --rm -v $PWD:$PWD:Z -w $PWD quay.io/coreos/tectonic-builder:bazel-v0.3 bazel --output_base=.cache build tarball
23+
podman run --rm -v $PWD:$PWD:Z -w $PWD quay.io/coreos/tectonic-builder:bazel-v0.3 bazel --output_base=.cache build tarball
2424
```
2525

2626
3. Extract the tarball

hack/go-fmt.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ if [ "$IS_CONTAINER" != "" ]; then
55
done
66
git diff --exit-code
77
else
8-
docker run --rm \
8+
podman run --rm \
99
--env IS_CONTAINER=TRUE \
1010
--volume "${PWD}:/go/src/github.com/openshift/installer:z" \
1111
--workdir /go/src/github.com/openshift/installer \

hack/go-lint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
if [ "$IS_CONTAINER" != "" ]; then
55
golint -set_exit_status "${@}"
66
else
7-
docker run --rm \
7+
podman run --rm \
88
--env IS_CONTAINER=TRUE \
99
--volume "${PWD}:/go/src/github.com/openshift/installer:z" \
1010
--workdir /go/src/github.com/openshift/installer \

hack/go-vet.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
if [ "$IS_CONTAINER" != "" ]; then
33
go vet "${@}"
44
else
5-
docker run --rm \
5+
podman run --rm \
66
--env IS_CONTAINER=TRUE \
77
--volume "${PWD}:/go/src/github.com/openshift/installer:z" \
88
--workdir /go/src/github.com/openshift/installer \

hack/shellcheck.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ if [ "$IS_CONTAINER" != "" ]; then
66
-o -path "${TOP_DIR}/.build" -prune \
77
-o -type f -name '*.sh' -exec shellcheck --format=gcc {} \+
88
else
9-
docker run --rm \
9+
podman run --rm \
1010
--env IS_CONTAINER=TRUE \
1111
--volume "${PWD}:/workdir:ro,z" \
1212
--entrypoint sh \

hack/test-bazel-build-tarball.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ if [ "$IS_CONTAINER" != "" ]; then
33
set -x
44
bazel --output_base=/tmp build "$@" tarball
55
else
6-
docker run --rm \
6+
podman run --rm \
77
--env IS_CONTAINER=TRUE \
88
--volume "${PWD}:${PWD}:z" \
99
--workdir "${PWD}" \

hack/tf-fmt.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#!/bin/sh
22

3-
# in prow, already in container, so no 'docker run'
3+
# in prow, already in container, so no 'podman run'
44
if [ "$IS_CONTAINER" != "" ]; then
55
set -x
66
/terraform fmt -list -check -write=false
77
else
8-
docker run --rm \
8+
podman run --rm \
99
--env IS_CONTAINER=TRUE \
1010
--volume "${PWD}:${PWD}:ro,z" \
1111
--workdir "${PWD}" \

hack/tf-lint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
if [ "$IS_CONTAINER" != "" ]; then
33
tflint
44
else
5-
docker run --rm \
5+
podman run --rm \
66
--env IS_CONTAINER=TRUE \
77
--volume "${PWD}:/data:z" \
88
--entrypoint sh \

hack/yaml-lint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
if [ "$IS_CONTAINER" != "" ]; then
33
yamllint --config-data "{extends: default, rules: {line-length: {level: warning, max: 120}}}" ./examples/ ./installer/
44
else
5-
docker run --rm \
5+
podman run --rm \
66
--env IS_CONTAINER=TRUE \
77
--volume "${PWD}:/workdir:z" \
88
--entrypoint sh \

modules/bootkube/resources/bootkube.service

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,12 @@
22
Description=Bootstrap a Kubernetes cluster
33
ConditionPathExists=!/opt/tectonic/init_bootkube.done
44
Wants=kubelet.service
5-
Requires=docker.service
6-
After=kubelet.service docker.service
5+
After=kubelet.service
76

87
[Service]
98
Type=oneshot
109
RemainAfterExit=true
1110
WorkingDirectory=/opt/tectonic
1211

13-
User=root
14-
Group=root
15-
1612
ExecStart=/usr/bin/bash /opt/tectonic/bootkube.sh
1713
ExecStartPost=/bin/touch /opt/tectonic/init_bootkube.done

modules/bootkube/resources/bootkube.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -e
44
echo "Rendering Kubernetes core manifests..."
55

66
# shellcheck disable=SC2154
7-
/usr/bin/docker run \
7+
/usr/bin/podman run \
88
--volume "$PWD:/assets:z" \
99
--volume /etc/kubernetes:/etc/kubernetes:z \
1010
"${kube_core_renderer_image}" \
@@ -14,7 +14,7 @@ echo "Rendering Kubernetes core manifests..."
1414
echo "Rendering TNC manifests..."
1515

1616
# shellcheck disable=SC2154
17-
/usr/bin/docker run \
17+
/usr/bin/podman run \
1818
--user 0 \
1919
--volume "$PWD:/assets:z" \
2020
"${tnc_operator_image}" \
@@ -29,14 +29,13 @@ cp "$PWD/tnc-bootstrap/tectonic-node-controller-config.yaml" /etc/kubernetes/tnc
2929
# We originally wanted to run the etcd cert signer as
3030
# a static pod, but kubelet could't remove static pod
3131
# when API server is not up, so we have to run this as
32-
# docker container.
32+
# podman container.
3333
# See https://github.com/kubernetes/kubernetes/issues/43292
3434

3535
echo "Starting etcd certificate signer..."
3636

3737
# shellcheck disable=SC2154
38-
SIGNER=$(/usr/bin/docker run -d \
39-
--tmpfs /tmp \
38+
SIGNER=$(/usr/bin/podman run -d \
4039
--volume /opt/tectonic/tls:/opt/tectonic/tls:ro,z \
4140
--network host \
4241
"${etcd_cert_signer_image}" \
@@ -57,8 +56,9 @@ i=0
5756
while true; do
5857
set +e
5958
# shellcheck disable=SC2154,SC2086
60-
/usr/bin/docker run \
59+
/usr/bin/podman run \
6160
--rm \
61+
--network host \
6262
--name etcdctl \
6363
--env ETCDCTL_API=3 \
6464
--volume /opt/tectonic/tls:/opt/tectonic/tls:ro,z \
@@ -86,15 +86,15 @@ done
8686

8787
echo "etcd cluster up. Killing etcd certificate signer..."
8888

89-
/usr/bin/docker kill "$SIGNER"
89+
/usr/bin/podman kill "$SIGNER"
9090
rm /etc/kubernetes/manifests/tectonic-node-controller-pod.yaml
9191

9292
cp -r "$PWD/bootstrap-configs" /etc/kubernetes/bootstrap-configs
9393

9494
echo "Starting bootkube..."
9595

9696
# shellcheck disable=SC2154
97-
/usr/bin/docker run \
97+
/usr/bin/podman run \
9898
--volume "$PWD:/assets:z" \
9999
--volume /etc/kubernetes:/etc/kubernetes:z \
100100
--network=host \

scripts/maintenance/clean-aws.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ usage() {
44
cat <<EOF
55
66
$(basename "$0") deletes AWS resources tagged with tags specified in a tag file.
7-
Requires that 'docker' and 'jq' are installed.
7+
Requires that 'podman' and 'jq' are installed.
88
99
AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environmental variables must be set.
1010
@@ -86,7 +86,7 @@ while [ $# -gt 0 ]; do
8686
shift
8787
done
8888

89-
if ! command -V docker >/dev/null || ! command -V jq >/dev/null; then
89+
if ! command -V podman >/dev/null || ! command -V jq >/dev/null; then
9090
echo "Missing required dependencies" >&2
9191
exit 1
9292
fi
@@ -155,9 +155,9 @@ if [ ! $force ]; then
155155
fi
156156
fi
157157

158-
trap 'docker stop grafiti-deleter; exit' EXIT
158+
trap 'podman stop grafiti-deleter; exit' EXIT
159159

160-
docker run -t --rm --name grafiti-deleter \
160+
podman run -t --rm --name grafiti-deleter \
161161
-v "$tmp_dir":/tmp/config:z \
162162
-e AWS_ACCESS_KEY_ID="$AWS_ACCESS_KEY_ID" \
163163
-e AWS_SECRET_ACCESS_KEY="$AWS_SECRET_ACCESS_KEY" \

scripts/maintenance/tag-aws.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ usage() {
55
66
$(basename "$0") tags AWS resources with 'expirationDate: some-date-string',
77
defaulting to tomorrow's date, and excludes all resources tagged with
8-
tag keys/values specified in an 'exclude' file. Requires that 'docker' is
8+
tag keys/values specified in an 'exclude' file. Requires that 'podman' is
99
installed.
1010
1111
AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environmental variables must be set.
@@ -101,7 +101,7 @@ while [ $# -gt 0 ]; do
101101
shift
102102
done
103103

104-
if ! command -V docker >/dev/null; then
104+
if ! command -V podman >/dev/null; then
105105
echo "Missing required dependencies" >&2
106106
exit 1
107107
fi
@@ -181,9 +181,9 @@ if [ ! $force ]; then
181181
fi
182182
fi
183183

184-
trap 'docker stop grafiti-tagger; exit' EXIT
184+
trap 'podman stop grafiti-tagger; exit' EXIT
185185

186-
docker run -t --rm --name grafiti-tagger \
186+
podman run -t --rm --name grafiti-tagger \
187187
-v "$tmp_dir":/tmp/config:z \
188188
-e AWS_ACCESS_KEY_ID="$AWS_ACCESS_KEY_ID" \
189189
-e AWS_SECRET_ACCESS_KEY="$AWS_SECRET_ACCESS_KEY" \

0 commit comments

Comments
 (0)