Skip to content

Commit 86bb02b

Browse files
committed
Restore README
1 parent cb040cb commit 86bb02b

File tree

1 file changed

+74
-0
lines changed

1 file changed

+74
-0
lines changed

docker/ubuntu/README.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
## Ubuntu: A Docker image used to build and test rippled
2+
3+
The code in this repository creates a locked-down Ubuntu image for building and
4+
testing rippled in the GitHub CI pipelines.
5+
6+
Although the images will be built by a CI pipeline in this repository, if
7+
necessary a maintainer can build them manually by following the instructions
8+
below.
9+
10+
### Logging into the Docker registry
11+
12+
To be able to push to GitHub a personal access token is needed, see instructions
13+
[here](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#authenticating-with-a-personal-access-token-classic).
14+
In summary, if you do not have a suitable personal access token, generate one
15+
[here](https://github.com/settings/tokens/new?scopes=write:packages).
16+
17+
```shell
18+
DOCKER_REGISTRY=ghcr.io
19+
GITHUB_USER=<your-github-username>
20+
GITHUB_TOKEN=<your-github-personal-access-token>
21+
echo ${GITHUB_TOKEN} | \
22+
docker login ${DOCKER_REGISTRY} -u "${GITHUB_USER}" --password-stdin
23+
```
24+
25+
### Building and pushing the Docker image
26+
27+
The same Dockerfile can be used to build an image for Ubuntu 22.04 and 24.04 by
28+
specifying the `UBUNTU_VERSION` build argument. There are additional arguments
29+
to specify as well, namely `CMAKE_VERSION` and `GCC_VERSION` for the GCC flavor
30+
and `CMAKE_VERSION` and `CLANG_VERSION` for the Clang flavor.
31+
32+
Run the commands below from the current directory containing the Dockerfile.
33+
34+
#### Building the Docker image for GCC.
35+
36+
Ensure you've run the login command above to authenticate with the Docker
37+
registry.
38+
39+
```shell
40+
UBUNTU_VERSION=noble
41+
GCC_VERSION=14
42+
DOCKER_IMAGE=xrplf/ci/${UBUNTU_VERSION}:gcc${GCC_VERSION}
43+
44+
DOCKER_BUILDKIT=1 docker build . \
45+
--target gcc \
46+
--build-arg BUILDKIT_INLINE_CACHE=1 \
47+
--build-arg UBUNTU_VERSION=${UBUNTU_VERSION} \
48+
--build-arg GCC_VERSION=${GCC_VERSION} \
49+
--tag ${DOCKER_REGISTRY}/${DOCKER_IMAGE} \
50+
--platform linux/amd64
51+
52+
docker push ${DOCKER_REGISTRY}/${DOCKER_IMAGE}
53+
```
54+
55+
#### Building the Docker image for Clang.
56+
57+
Ensure you've run the login command above to authenticate with the Docker
58+
registry.
59+
60+
```shell
61+
UBUNTU_VERSION=noble
62+
CLANG_VERSION=18
63+
DOCKER_IMAGE=xrplf/ci/${UBUNTU_VERSION}:clang${CLANG_VERSION}
64+
65+
DOCKER_BUILDKIT=1 docker build . \
66+
--target clang \
67+
--build-arg BUILDKIT_INLINE_CACHE=1 \
68+
--build-arg UBUNTU_VERSION=${UBUNTU_VERSION} \
69+
--build-arg CLANG_VERSION=${CLANG_VERSION} \
70+
--tag ${DOCKER_REGISTRY}/${DOCKER_IMAGE} \
71+
--platform linux/amd64
72+
73+
docker push ${DOCKER_REGISTRY}/${DOCKER_IMAGE}
74+
```

0 commit comments

Comments
 (0)