|
1 | 1 | # Emscripten CI
|
2 | 2 |
|
3 |
| -The main purpose of this repository is hosting the [Dockerfile](./Dockerfile) |
4 |
| -for building the Docker image used for the |
5 |
| -[Emscripten CircleCI build](https://circleci.com/gh/emscripten-core/emscripten). |
| 3 | +The main purpose of this repository is hosting the [Dockerfile](./Dockerfile) |
| 4 | +for building the Docker image used for the |
| 5 | +[Emscripten CircleCI build](https://circleci.com/gh/emscripten-core/emscripten). |
6 | 6 |
|
7 |
| -## :whale: Pre-built Docker Image |
8 |
| -This [Dockerfile](./Dockerfile) allows to build a Docker image, with the tools |
9 |
| -required for the Emscripten CI build. The image is hosted at |
10 |
| -[Docker Hub](https://hub.docker.com/r/emscripten/emscripten-ci) and used |
11 |
| -by the [CircleCI Emscripten Project](https://circleci.com/gh/emscripten-core/emscripten). |
| 7 | +## :whale: Pre-built Docker Image |
| 8 | +This [Dockerfile](./Dockerfile) allows to build a Docker image, with the tools |
| 9 | +required for the Emscripten CI build. The image is hosted at |
| 10 | +[Docker Hub](https://hub.docker.com/r/emscripten/emscripten-ci) and used |
| 11 | +by the [CircleCI Emscripten Project](https://circleci.com/gh/emscripten-core/emscripten). |
12 | 12 |
|
13 |
| -The following sections describe the important parts of the [Dockerfile](./Dockerfile). |
| 13 | +The following sections describe the important parts of the [Dockerfile](./Dockerfile). |
14 | 14 | ### Base Image
|
15 |
| -The `FROM` instruction sets the base image for the final Docker image. Also, all subsequent instructions are executed using this base image. |
| 15 | +The `FROM` instruction sets the base image for the final Docker image. Also, all subsequent instructions are executed using this base image. |
16 | 16 |
|
17 |
| -See [FROM](https://docs.docker.com/engine/reference/builder/#from) (Docker Reference). |
| 17 | +See [FROM](https://docs.docker.com/engine/reference/builder/#from) (Docker Reference). |
18 | 18 |
|
19 | 19 | ### Package Installation (apt-get)
|
20 | 20 | Additional packages/tools required by the Emscripten CI build are installed via apt-get using the `RUN` instruction.
|
21 | 21 |
|
22 | 22 | It is good practice to execute `apt-get update && apt-get install * && apt-get clean cache` using a single `RUN` instruction, as each docker instruction is creating a new read-only layer. Running `apt-get clean` helps keeping the resulting image size low (which would not be the case if `apt-get install` was executed as a separate `RUN` instruction).
|
23 | 23 |
|
24 |
| -It's recommended to sort the package names alphabetically. For better traceability we created separate package sections for build, docs and test packages. |
| 24 | +It's recommended to sort the package names alphabetically. For better traceability we created separate package sections for build, docs and test packages. |
25 | 25 |
|
26 |
| -See [best practices for writing Dockerfiles](https://docs.docker.com/develop/develop-images/dockerfile_best-practices/). |
| 26 | +See [best practices for writing Dockerfiles](https://docs.docker.com/develop/develop-images/dockerfile_best-practices/). |
27 | 27 |
|
28 |
| -### Package Installation (pip) |
| 28 | +### Package Installation (pip) |
29 | 29 |
|
30 |
| -Pip packages required by the Emscripten CI build are installed in a similar manner as described in the previous section. For example, the `--no-cache-dir` parameter is used in order to keep the size of the final image low. |
| 30 | +Pip packages required by the Emscripten CI build are installed in a similar manner as described in the previous section. For example, the `--no-cache-dir` parameter is used in order to keep the size of the final image low. |
31 | 31 |
|
32 | 32 | ### Building the image and pushing it to Docker Hub
|
33 | 33 |
|
34 | 34 | Use the following commands for updating the `emscripten-ci` pre-built Docker image:
|
35 | 35 |
|
36 |
| -:warning: Write access to the [Docker Hub repository](https://hub.docker.com/r/emscripten/emscripten-ci) is required. |
| 36 | +:warning: Write access to the [Docker Hub repository](https://hub.docker.com/r/emscripten/emscripten-ci) is required. |
37 | 37 |
|
38 | 38 | 1. Clone/pull the latest version of this repository
|
39 | 39 |
|
40 | 40 | 1. Build docker image locally from the repository root (location of [Dockerfile](/Dockerfile)):
|
41 |
| - |
42 |
| - `docker build . --tag emscripten/emscripten-ci` |
43 |
| - |
| 41 | + |
| 42 | + `docker build . --tag emscripten/emscripten-ci` |
| 43 | + |
44 | 44 | 1. Login to your Docker Hub account (if not logged in already):
|
45 | 45 |
|
46 | 46 | `docker login`
|
47 |
| - |
| 47 | + |
48 | 48 | 1. Push docker image to Docker Hub:
|
49 |
| - |
| 49 | + |
50 | 50 | `docker push emscripten/emscripten-ci`
|
51 |
| - |
52 |
| -See [Docker CLI reference](https://docs.docker.com/engine/reference/commandline/cli/) for further details. |
| 51 | + |
| 52 | +See [Docker CLI reference](https://docs.docker.com/engine/reference/commandline/cli/) for further details. |
0 commit comments