Refactor Dockerfile to use build argument for Ubuntu version and update README.md with detailed features and installation instructions

This commit is contained in:
2025-12-08 19:29:55 +01:00
parent 8a28db072b
commit 16b1540876
2 changed files with 56 additions and 6 deletions

View File

@@ -1,7 +1,9 @@
FROM ubuntu:24.04
ARG UBUNTU_VERSION=24.04
FROM ubuntu:${UBUNTU_VERSION}
LABEL maintainer="thommyho"
LABEL description="An Ubuntu 24.04 image with essential tools for git development and CI/CD pipelines."
LABEL description="An Ubuntu image with essential tools for git development and CI/CD pipelines."
ENV NVM_DIR=/usr/local/nvm \
NODE_VERSION=24.11.1 \

View File

@@ -1,11 +1,59 @@
# Building the Docker Image
# Docker Runner Gitea
This command builds a Docker image for a Gitea runner environment with Node.js 24 on Ubuntu Noble.
An Ubuntu-based Docker image with essential tools for Gitea CI/CD pipelines and development.
**Usage:**
## Features
## Docker Runner Gitea
- **Base OS:** Ubuntu 24.04 (Noble)
- **Node.js:** v24.11.1 (managed via NVM)
- **Build Tools:** Essential development utilities including git, curl, wget, build-essential
- **Package Managers:** pip (Python 3), conan (C/C++ package manager)
- **Additional Tools:** Python 3, ca-certificates
## Prerequisites
- Docker installed on your system
- At least 2GB of free disk space
- Internet connection (for downloading base image and dependencies)
## Installation
### Building the Image
Clone or download this repository, then build the Docker image:
```sh
docker build -t docker-runner-gitea:noble-node-24 .
```
To specify a different Ubuntu version:
```sh
docker build --build-arg UBUNTU_VERSION=22.04 -t docker-runner-gitea:jammy-node-24 .
```
### Running a Container
```sh
docker run -it docker-runner-gitea:noble-node-24 /bin/bash
```
### Using as a Gitea Runner
Configure this image in your Gitea instance for CI/CD pipelines by specifying the image name in your runner configuration.
## Installed Packages
| Package | Version | Purpose |
|-----------------|---------|-----------------------|
| Node.js | 24.11.1 | JavaScript runtime |
| Python | 3.x | Scripting and tools |
| Conan | Latest | C/C++ package manager |
| Git | Latest | Version control |
| build-essential | Latest | Compilation tools |
Notes
- The image uses NVM (Node Version Manager) for flexible Node.js version management
- Pip packages are installed with --break-system-packages flag for Python 3
- All apt cache is cleaned to minimize image size