|
1 | | -# docker-urbanopt |
| 1 | +# urbanopt-cloud |
| 2 | + |
| 3 | +Docker container for URBANopt CLI 1.1.0 on Ubuntu 22.04. |
| 4 | + |
| 5 | +## Overview |
| 6 | + |
| 7 | +This repository contains a Dockerfile that builds a Docker container with URBANopt CLI 1.1.0 installed on Ubuntu 22.04. The container is automatically built, tested, and pushed to Docker Hub via GitHub Actions. |
| 8 | + |
| 9 | +## Features |
| 10 | + |
| 11 | +- **URBANopt CLI 1.1.0**: Pre-installed and configured |
| 12 | +- **Ubuntu 22.04**: Base image with all required dependencies |
| 13 | +- **Automated CI/CD**: GitHub Actions workflow for building, testing, and publishing |
| 14 | +- **Versioning**: Automatic semantic versioning via Git tags |
| 15 | + |
| 16 | +## Usage |
| 17 | + |
| 18 | +### Pull from Docker Hub |
| 19 | + |
| 20 | +```bash |
| 21 | +docker pull brianlball/urbanopt-cloud:latest |
| 22 | +``` |
| 23 | + |
| 24 | +### Run the Container |
| 25 | + |
| 26 | +```bash |
| 27 | +# Run with default command (shows version) |
| 28 | +docker run --rm brianlball/urbanopt-cloud:latest |
| 29 | + |
| 30 | +# Run interactively |
| 31 | +docker run -it --rm brianlball/urbanopt-cloud:latest bash |
| 32 | + |
| 33 | +# Run with a mounted workspace |
| 34 | +docker run -it --rm -v $(pwd):/work brianlball/urbanopt-cloud:latest |
| 35 | +``` |
| 36 | + |
| 37 | +### Build Locally |
| 38 | + |
| 39 | +```bash |
| 40 | +docker build -t urbanopt-cloud:latest . |
| 41 | +``` |
| 42 | + |
| 43 | +## GitHub Actions Workflow |
| 44 | + |
| 45 | +The repository includes a GitHub Actions workflow that: |
| 46 | + |
| 47 | +1. **Builds** the Docker container |
| 48 | +2. **Tests** the container by running `uo --version` |
| 49 | +3. **Pushes** to Docker Hub with appropriate tags: |
| 50 | + - `latest` - for commits to main/master branch |
| 51 | + - `<branch>` - for branch commits |
| 52 | + - `v1.0.0`, `v1.0`, `v1` - for semantic version tags |
| 53 | + - `<branch>-<sha>` - for commit SHA references |
| 54 | + |
| 55 | +### Docker Hub Configuration |
| 56 | + |
| 57 | +To enable automatic pushing to Docker Hub, configure the following repository secrets: |
| 58 | + |
| 59 | +1. Go to your repository **Settings** → **Secrets and variables** → **Actions** |
| 60 | +2. Click **"New repository secret"** |
| 61 | +3. Add the following secrets: |
| 62 | + - `DOCKER_USERNAME`: Your Docker Hub username |
| 63 | + - `DOCKER_PASSWORD`: Your Docker Hub password or access token |
| 64 | + |
| 65 | +### Versioning |
| 66 | + |
| 67 | +To create a new versioned release: |
| 68 | + |
| 69 | +```bash |
| 70 | +git tag -a v1.0.0 -m "Release version 1.0.0" |
| 71 | +git push origin v1.0.0 |
| 72 | +``` |
| 73 | + |
| 74 | +## Architecture Support |
| 75 | + |
| 76 | +The Dockerfile supports both x86_64 (default) and arm64 architectures. To build for a specific architecture, use the `UO_ARCH` build argument: |
| 77 | + |
| 78 | +```bash |
| 79 | +# Build for x86_64 (default) |
| 80 | +docker build -t urbanopt-cloud:x86_64 . |
| 81 | + |
| 82 | +# Build for arm64 |
| 83 | +docker build --build-arg UO_ARCH=arm64 -t urbanopt-cloud:arm64 . |
| 84 | +``` |
| 85 | + |
| 86 | +## License |
| 87 | + |
| 88 | +See the URBANopt CLI license for details. |
0 commit comments