Skip to content

Commit 631d8c7

Browse files
committed
Moving to a prebuilt CentOS 7 docker image
1 parent 072287c commit 631d8c7

File tree

4 files changed

+57
-1
lines changed

4 files changed

+57
-1
lines changed

.github/actions/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ inputs:
66
required: true
77
runs:
88
using: 'docker'
9-
image: '../../docker/CentOS7.Dockerfile'
9+
image: '../../docker/CI.Dockerfile'
1010
# Tell Conan to look for or create its build folder (.conan) in the repository's root directory
1111
env:
1212
CONAN_USER_HOME: $GITHUB_WORKSPACE

docker/CI.Dockerfile

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM cesiumgs/omniverse-centos7-build:2023-08-29
2+
3+
WORKDIR /var/app
4+
5+
ENTRYPOINT ["/bin/bash"]

docker/CentOS7.Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This is used to generate the image with dependencies that CI.Dockerfile relies on.
2+
# For instructions for deploying this, check docs/release-guide/push-docker-image.md.
13
FROM centos:7
24

35
RUN yum update -y -q
+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Pushing the Docker Image for CentOS 7 builds.
2+
3+
We use a docker image for our CentOS 7 builds that contains all of our build dependencies, so we don't have to build the image from scratch on each build. This document outlines how to build and push this to Docker Hub.
4+
5+
## Installing Docker
6+
7+
Install [Docker Desktop](https://docs.docker.com/desktop/install/ubuntu/). You will need a license for this and access to our account.
8+
9+
On Linux, docker is run as root. To avoid the requirement for `sudo`, you should add your user to the `docker` group:
10+
11+
```shell
12+
sudo usermod -aG docker $USER
13+
```
14+
15+
## Building the container
16+
17+
Confirm that you have push access to the [container repo](https://hub.docker.com/r/cesiumgs/omniverse-centos7-build).
18+
19+
### Log in
20+
21+
Log into docker using:
22+
23+
```shell
24+
docker login
25+
```
26+
27+
### Build the docker image
28+
29+
After making your changes to the docker file, execute:
30+
31+
```shell
32+
docker build --tag cesiumgs/omniverse-centos7-build:$TAGNAME -f docker/CentOS7.Dockerfile . --no-cache
33+
```
34+
35+
You should replace `TAGNAME` with the current date in `YYYY-MM-DD` format. So if it's the 29th of August, 2023, you would use `2023-08-29`.
36+
37+
### Push the image to Docker Hub
38+
39+
The build will take some time. Once it is finished, execute the following to push the image to Docker Hub:
40+
41+
```shell
42+
docker push cesiumgs/omniverse-centos7-build:$TAGNAME
43+
```
44+
45+
Again, you should replace `$TAGNAME` with the current date in `YYYY-MM-DD` format. So if it's the 29th of August, 2023, you would use `2023-08-29`.
46+
47+
### Update CI.Dockerfile
48+
49+
The `docker/CI.Dockerfile` file is used as part of the CentOS build step in our GitHub actions. You will need to update the version of the Docker image used to the tagged version you just uploaded.

0 commit comments

Comments
 (0)