Skip to content

Repository files navigation

Go Docker Container Images

Build Status Docker Pulls Docker Stars

Table of Contents

Docker Images

Use image revision tags such as wodby/go:1.27-rN to select a Wodby image revision. Major and minor tags use the repository release number, starting at r0. Full-version tags such as wodby/go:1.27.1-r0 start at r0 for each exact upstream version. Every published versioned revision tag has a matching annotated Git tag pointing to its release commit. Existing tags remain available after support for their major or minor version ends. See release tags for available revisions and the image revision policy for upgrade guidance. Previously published image tags remain available.

About images:

Supported tags and respective Dockerfile links:

-dev

Images with -dev tag have sudo allowed for all commands for the wodby user and include build dependencies for cgo-based projects.

-dev-macos

Same as -dev but the default user/group wodby has uid/gid 501/20 to match the macOS default user/group ids.

Supported architectures

All images are built for linux/amd64, -dev-macos images are additionally built for linux/arm64.

Environment Variables

Variable Default value
APP_ROOT /usr/src/app
FILES_DIR /mnt/files
GIT_USER_EMAIL wodby@example.com
GIT_USER_NAME wodby
GOCACHE /home/wodby/.cache/go-build
GOMODCACHE /home/wodby/go/pkg/mod
GOPATH /home/wodby/go
SSH_DISABLE_STRICT_KEY_CHECKING
SSH_PRIVATE_KEY
SSHD_GATEWAY_PORTS no
SSHD_HOST_KEYS_DIR /etc/ssh
SSHD_LOG_LEVEL INFO
SSHD_PASSWORD_AUTHENTICATION no
SSHD_PERMIT_USER_ENV no
SSHD_USE_DNS yes

Build arguments

Argument Default value
GO_DEV
WODBY_GROUP_ID 1000
WODBY_USER_ID 1000

Change WODBY_USER_ID and WODBY_GROUP_ID mainly for local dev image variants. If either value matches an existing system user/group id, the existing user/group will be deleted before creating the wodby user.

Tools

Tool all versions
Go toolchain bundled from the upstream golang image
make latest Alpine package
git latest Alpine package

Changelog

For changes in each image revision, see the release notes.

Crond

You can run Crond with this image by changing the command to sudo -E crond -f -d 0 and mounting a crontab file to ./crontab:/etc/crontabs/wodby. Example crontab file contents:

# min	hour	day	month	weekday	command
*/1	*	*	*	*	echo "test" > /mnt/files/cron

SSHD

You can run SSHD with this image by changing the command to sudo /usr/sbin/sshd -De and mounting authorized public keys to /home/wodby/.ssh/authorized_keys.

Adding SSH key

You can add a private SSH key to the container by mounting it to /home/wodby/.ssh/id_rsa.

Complete Go stack

See https://github.com/wodby/stack-go

Orchestration Actions

Usage:

make COMMAND [params ...]

commands:
    check-ready [host max_try wait_seconds delay_seconds]
    files-import source
    files-link public_dir

Building with pinned base images

Build with the Makefile to use the base image digests in base-images.mk. Local builds and CI resolve the same version and variant to the same multi-platform image. A version without a pin fails before the build starts.

When adding a supported base version or variant, add its image index digest to base-images.mk. For a custom build, override BASE_IMAGE with a complete repository:tag@sha256:... reference.

Development workspace contract

Development variants declare com.wodby.workspace.contract=1. Configuration-only startup (/docker-entrypoint.sh --configure-runtime) does not rewrite developer SSH/Git settings, initialize shared storage, or run application hooks. Normal startup retains its existing behavior. WODBY_WORKSPACE=1 selects the workspace startup command. Login-shell tools remain available when the developer home is mounted.

workspace-go prepare resolves the selected package's dependencies. workspace-go start recompiles and executes it on every application restart. WORKSPACE_GO_PACKAGE defaults to .; WORKSPACE_GO_COMMAND overrides startup. HOST and PORT default to 0.0.0.0 and 8080, but the application must read them. Builds use temporary module metadata and -mod=readonly, preserving repository go.mod and go.sum. Fix dependency declarations deliberately before retrying a failed preparation. go.work projects need custom preparation/start commands. There is no automatic watcher. Existing Go build-cache settings are preserved.

Dependencies/build output use .wodby-workspace/ in the shared checkout, excluded through .git/info/exclude without editing .gitignore. A tracked directory or symlink at that reserved path is refused. The runner's private home is not required by application pods. Package lifecycle scripts remain application-owned and may modify files; review Git changes after preparation.

CI checks labels for all image variants and runs configuration, developer-state, reserved-path and runtime tests for development variants. Publish a new image revision before enabling this contract in a consuming service.

About

Go docker container images

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages