|
| 1 | +# Red Hat UBI9 Development Image |
| 2 | + |
| 3 | +A comprehensive development workspace image based on Red Hat Universal Base Image 9 (UBI9) for use with Coder. |
| 4 | + |
| 5 | +## Features |
| 6 | + |
| 7 | +### Base Operating System |
| 8 | +- **Red Hat UBI9**: Enterprise-grade, security-focused base image |
| 9 | +- **Enterprise Ready**: Red Hat supported with regular security updates |
| 10 | +- **Compliance**: Meets enterprise security and compliance requirements |
| 11 | + |
| 12 | +### Development Tools |
| 13 | + |
| 14 | +#### Languages & Runtimes |
| 15 | +- **Go 1.24.2**: Latest Go version with complete toolchain |
| 16 | +- **Node.js 20**: Latest LTS with npm and pnpm |
| 17 | +- **Python 3**: System Python with pip |
| 18 | +- **Rust**: Latest stable with Cargo |
| 19 | + |
| 20 | +#### Go Development Tools |
| 21 | +- `gopls` - Go language server |
| 22 | +- `goimports` - Import management |
| 23 | +- `moq` - Mock generation |
| 24 | +- `swag` - Swagger documentation |
| 25 | +- `swagger` - API client generation |
| 26 | +- `migrate` - Database migrations |
| 27 | +- `goreleaser` - Release automation |
| 28 | +- `gotestsum` - Enhanced test output |
| 29 | +- `kind` - Kubernetes in Docker |
| 30 | +- `helm-docs` - Helm documentation |
| 31 | +- `sqlc` - SQL code generation |
| 32 | +- `ruleguard` - Custom linting rules |
| 33 | +- `shfmt` - Shell script formatting |
| 34 | +- `nfpm` - Package building |
| 35 | +- `yq` - YAML processing |
| 36 | +- `mockgen` - Interface mocking |
| 37 | + |
| 38 | +#### Infrastructure & DevOps |
| 39 | +- **Docker CE**: Container development and deployment |
| 40 | +- **Terraform**: Infrastructure as Code |
| 41 | +- **kubectl**: Kubernetes command-line tool |
| 42 | +- **Helm**: Kubernetes package manager |
| 43 | + |
| 44 | +#### Development Utilities |
| 45 | +- **Git**: Version control |
| 46 | +- **jq**: JSON processing |
| 47 | +- **htop**: Process monitoring |
| 48 | +- **tmux**: Terminal multiplexer |
| 49 | +- **vim/nano**: Text editors |
| 50 | +- **fish/zsh/bash**: Multiple shell options |
| 51 | +- **pre-commit**: Git hooks framework |
| 52 | + |
| 53 | +#### Rust Tools |
| 54 | +- `jj-cli` - Jujutsu version control |
| 55 | +- `typos-cli` - Spell checker |
| 56 | +- `watchexec-cli` - File watcher |
| 57 | + |
| 58 | +#### Protocol Buffers |
| 59 | +- `protoc` - Protocol buffer compiler |
| 60 | +- Go protobuf plugins |
| 61 | + |
| 62 | +## Usage |
| 63 | + |
| 64 | +### With Coder Templates |
| 65 | + |
| 66 | +Use this image in your Coder workspace templates: |
| 67 | + |
| 68 | +```hcl |
| 69 | +resource "docker_image" "main" { |
| 70 | + name = "codercom/enterprise-redhat-ubi9" |
| 71 | +} |
| 72 | +
|
| 73 | +resource "docker_container" "workspace" { |
| 74 | + count = data.coder_workspace.me.start_count |
| 75 | + image = docker_image.main.name |
| 76 | + name = "coder-${data.coder_workspace.me.owner}-${data.coder_workspace.me.name}" |
| 77 | + |
| 78 | + # Add your configuration here |
| 79 | +} |
| 80 | +``` |
| 81 | + |
| 82 | +### Building Locally |
| 83 | + |
| 84 | +```bash |
| 85 | +# Build the image |
| 86 | +docker build -f ubi9.Dockerfile -t coder-redhat-ubi9 . |
| 87 | + |
| 88 | +# Run interactively |
| 89 | +docker run -it --rm coder-redhat-ubi9 |
| 90 | +``` |
| 91 | + |
| 92 | +### Environment Variables |
| 93 | + |
| 94 | +The image sets up the following environment: |
| 95 | + |
| 96 | +- `GOPATH=/home/coder/go` |
| 97 | +- `GOROOT=/usr/local/go` |
| 98 | +- `PATH` includes Go, Node.js, and all development tools |
| 99 | +- `LANG=en_US.UTF-8` |
| 100 | +- `LC_ALL=en_US.UTF-8` |
| 101 | + |
| 102 | +### User Configuration |
| 103 | + |
| 104 | +- **User**: `coder` (non-root) |
| 105 | +- **Home**: `/home/coder` |
| 106 | +- **Shell**: bash (with zsh and fish available) |
| 107 | +- **Sudo**: Passwordless sudo access |
| 108 | + |
| 109 | +### Ports |
| 110 | + |
| 111 | +The following ports are exposed for development: |
| 112 | + |
| 113 | +- `3000` - Frontend development servers |
| 114 | +- `8080` - Backend services |
| 115 | +- `8443` - HTTPS services |
| 116 | + |
| 117 | +## Use Cases |
| 118 | + |
| 119 | +This image is ideal for: |
| 120 | + |
| 121 | +- **Go Development**: Complete Go development environment |
| 122 | +- **Full-Stack Development**: Go backend + Node.js frontend |
| 123 | +- **Cloud Native Development**: Kubernetes and container development |
| 124 | +- **Infrastructure Development**: Terraform and DevOps workflows |
| 125 | +- **Enterprise Environments**: Red Hat compliance and support |
| 126 | +- **Multi-language Projects**: Go, Node.js, Python, Rust support |
| 127 | + |
| 128 | +## Security & Compliance |
| 129 | + |
| 130 | +- Based on Red Hat UBI9 for enterprise security |
| 131 | +- Regular security updates from Red Hat |
| 132 | +- Non-root user execution |
| 133 | +- Minimal attack surface with curated tool selection |
| 134 | +- Compliance with enterprise security policies |
| 135 | + |
| 136 | +## Size Optimization |
| 137 | + |
| 138 | +- Multi-stage build to minimize final image size |
| 139 | +- Package cache cleanup |
| 140 | +- Optimized layer structure |
| 141 | +- Only essential development tools included |
| 142 | + |
| 143 | +## Support |
| 144 | + |
| 145 | +For issues related to: |
| 146 | +- **This image**: Open an issue in the [coder/images](https://github.com/coder/images) repository |
| 147 | +- **Coder platform**: Visit [coder.com/docs](https://coder.com/docs) |
| 148 | +- **Red Hat UBI9**: Check [Red Hat documentation](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9) |
| 149 | + |
| 150 | +## License |
| 151 | + |
| 152 | +This image configuration is provided under the same license as the Coder project. |
| 153 | +Red Hat UBI9 is freely redistributable under Red Hat's Universal Base Image End User License Agreement. |
0 commit comments