Skip to content

Commit 75ec4a0

Browse files
committed
chore(go-dev): use podman replace docker
1 parent e98fdf5 commit 75ec4a0

5 files changed

Lines changed: 20 additions & 28 deletions

File tree

.woodpecker/build-linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pipeline:
1313
image: bash
1414
commands:
1515
- export VERSION=$([ -z $CI_COMMIT_TAG ] && echo latest || echo $CI_COMMIT_TAG)-$(sed 's#/#-#g' <<< $CI_SYSTEM_ARCH)
16-
- echo $CONTAINER_PASSWORD | docker login $DRYCC_REGISTRY --username $CONTAINER_USERNAME --password-stdin > /dev/null 2>&1
16+
- echo $CONTAINER_PASSWORD | podman login $DRYCC_REGISTRY --username $CONTAINER_USERNAME --password-stdin > /dev/null 2>&1
1717
- make build push
1818
secrets:
1919
- codename

.woodpecker/manifest.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ 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
2626
-e DRONE_TAG=$CI_COMMIT_TAG
2727
-v $(pwd):$(pwd)
2828
-w $(pwd)
29-
plugins/manifest
29+
docker.io/plugins/manifest
3030
secrets:
3131
- container_username
3232
- container_password

Makefile

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ PLATFORM ?= linux/amd64,linux/arm64
77
# scripts are checked *after* build, so use paths inside the container
88
SHELL_SCRIPTS = /usr/local/bin/test-cover.sh
99

10-
# dockerized development environment variables
11-
DEV_ENV_PREFIX := docker run --rm
10+
# container development environment variables
11+
DEV_ENV_PREFIX := podman run --rm
1212
DEV_ENV_CMD := ${DEV_ENV_PREFIX} ${IMAGE}
1313

1414
info:
@@ -17,13 +17,10 @@ info:
1717
@echo "IMAGE: ${IMAGE}"
1818

1919
build:
20-
docker build --build-arg CODENAME=${CODENAME} -t ${IMAGE} rootfs
21-
22-
buildx:
23-
docker buildx build --build-arg CODENAME=${CODENAME} --platform ${PLATFORM} -t ${IMAGE} rootfs --push
20+
podman build --build-arg CODENAME=${CODENAME} -t ${IMAGE} rootfs
2421

2522
push: build
26-
docker push ${IMAGE}
23+
podman push ${IMAGE}
2724

2825
test: build
2926
${DEV_ENV_CMD} shellcheck $(SHELL_SCRIPTS)

README.md

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,16 @@
22

33
A [Go][] language development toolbox.
44

5-
Many [Drycc Workflow][] components use this Docker image as a standard build and test environment,
5+
Many [Drycc Workflow][] components use this Container image as a standard build and test environment,
66
but it is intended to be useful to any Go developer. Please help make drycc/go-dev better by
77
creating [issues][] and submitting [pull requests][].
88

99
## Image Contents
1010

11-
* based on [Ubuntu 16.04][]
1211
* [az][]: Azure cloud command-line tool
1312
* [azcopy][]: Utility for copying data to/from Microsoft Azure Blob and File storage
1413
* [dep][]: Go dependency management tool
1514
* [delve][]: debugger for the Go programming language
16-
* [Docker][]: Docker binaries to be able to bind mount /var/run/docker.sock in the dev environment container
1715
* [gb][]: project-based build tool for Go
1816
* [ginkgo][]: BDD testing framework for Go
1917
* [glide][]: Go dependency management tool
@@ -39,32 +37,30 @@ creating [issues][] and submitting [pull requests][].
3937
## Usage
4038

4139
Mount your local Go code into a container's `$GOPATH` to run any `go` command or one of the
42-
included tools or scripts. Here's an example of running `glide up` for drycc/builder:
40+
included tools or scripts. Here's an example of running `go build` for drycc/builder:
4341

4442
```console
45-
$ docker run --rm \
43+
$ podman run --rm \
4644
--volume $GOPATH/src/github.com/drycc/builder:/go/src/github.com/drycc/builder \
4745
--workdir /go/src/github.com/drycc/builder \
48-
drycc/go-dev \
49-
glide up
46+
registry.drycc.cc/drycc/go-dev \
47+
go build
5048
```
5149

52-
The latest drycc/go-dev Docker image is available at:
50+
The latest registry.drycc.cc/drycc/go-dev Container image is available at:
5351

54-
* [Docker Hub][]
52+
* [Drycc Registry][]
5553
```
56-
docker pull drycc/go-dev
54+
podman pull registry.drycc.cc/drycc/go-dev
5755
```
5856

5957
[az]: https://github.com/Azure/azure-cli#readme
6058
[azcopy]: https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-linux?toc=%2fazure%2fstorage%2ffiles%2ftoc.json
6159
[Drycc Workflow]: https://drycc.com/
6260
[delve]: https://github.com/derekparker/delve
6361
[dep]: https://github.com/golang/dep
64-
[Docker Hub]: https://hub.docker.com
65-
[Docker]: http://www.docker.com
6662
[gb]: https://github.com/constabulary/gb/
67-
[gen-changelog.sh]: https://github.com/drycc/docker-go-dev/tree/main/rootfs/usr/local/bin/gen-changelog.sh
63+
[gen-changelog.sh]: https://github.com/drycc/go-dev/tree/main/rootfs/usr/local/bin/gen-changelog.sh
6864
[ginkgo]: https://github.com/onsi/ginkgo
6965
[glide]: https://github.com/Masterminds/glide
7066
[go-bindata]: https://github.com/jteeuwen/go-bindata
@@ -74,18 +70,17 @@ The latest drycc/go-dev Docker image is available at:
7470
[golangci-lint]: https://github.com/golangci/golangci-lint
7571
[gox]: https://github.com/mitchellh/gox
7672
[helm]: https://github.com/kubernetes/helm
77-
[issues]: https://github.com/drycc/docker-go-dev/issues
73+
[issues]: https://github.com/drycc/go-dev/issues
7874
[jq]: https://stedolan.github.io/jq/
7975
[jwt]: https://github.com/dgrijalva/jwt-go
8076
[k]: https://github.com/jakepearson/k
8177
[kubectl]: https://kubernetes.io/docs/user-guide/kubectl-overview/
82-
[pull requests]: https://github.com/drycc/docker-go-dev/pulls
78+
[pull requests]: https://github.com/drycc/go-dev/pulls
8379
[Packer]: https://github.com/hashicorp/packer
8480
[ruby]: https://www.ruby-lang.org/
8581
[shellcheck]: https://github.com/koalaman/shellcheck
8682
[shyaml]: https://github.com/0k/shyaml
87-
[test-cover.sh]: https://github.com/drycc/docker-go-dev/tree/main/rootfs/usr/local/bin/test-cover.sh
88-
[Ubuntu 16.04]: https://hub.docker.com/_/ubuntu/
83+
[test-cover.sh]: https://github.com/drycc/go-dev/tree/main/rootfs/usr/local/bin/test-cover.sh
8984
[unzip]: https://linux.die.net/man/1/unzip
9085
[upx]: http://upx.sourceforge.net/
9186
[vim]: http://www.vim.org/

rootfs/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LABEL name="drycc-go-dev"
66
ENV GO_VERSION=1.20
77
ENV GOLANGCI_LINT_VERSION=v1.53.3
88

9-
# This is a huge one-liner to optimize the Docker image layer.
9+
# This is a huge one-liner to optimize the Container image layer.
1010
# We disable source repos to speed up apt-get update.
1111
RUN export DEBIAN_FRONTEND=noninteractive \
1212
&& install-packages \

0 commit comments

Comments
 (0)