|
1 |
| -## Make docker image |
2 |
| -``` |
3 |
| -git clone --depth=1 https://github.com/be5invis/Iosevka.git $HOME/mkdkimg |
4 |
| -cd $HOME/mkdkimg/docker |
5 |
| -docker build -t=fontcc . |
6 |
| -docker images | grep fontcc # Confirm that the docker image is generated successfully |
7 |
| -fontcc latest c847d5e08886 About a minute ago 491MB |
8 |
| -cd ../.. |
9 |
| -rm -rf mkdkimg/ |
10 |
| -``` |
11 |
| -Note: Make docker image need execute only one time. |
12 |
| - |
13 |
| -## Usage |
14 |
| -`docker run -it --rm -v $PWD:/work fontcc <BUILD_ARGS>` |
15 |
| -Please refer to the `<BUILD_ARGS>` parameters to [Customized Build](../../dev/doc/custom-build.md#customized-build) |
16 |
| -### Optional parameters (put them before `fontcc`): |
17 |
| -1. `-e "VERSION_TAG=<tag>"` |
18 |
| - |
19 |
| -`<tag>` can be the following values |
20 |
| -- `main` git main branch |
21 |
| -- `dev` git dev branch |
22 |
| -- `v28.0.5` git [release version tags](../../../tags) |
23 |
| - |
24 |
| -When this variable is omitted, the tag of the latest release will be selected |
25 |
| - |
26 |
| -2. `-e "NPM_REG=<npm repository mirror url>"` |
27 |
| - |
28 |
| -change `npm install` download repository to mirror site. |
29 |
| - |
30 |
| -eg. change npm repos to huawei mirror |
31 |
| - `docker run -it --rm -v $PWD:/work -e "NPM_REG=https://mirrors.huaweicloud.com/repository/npm" fontcc contents::Iosevka` |
32 |
| - |
33 |
| -## Example |
34 |
| -### Partially Build dev branch |
35 |
| -``` |
36 |
| -mkdir -p $HOME/build_fonts |
37 |
| -cd $HOME/build_fonts |
38 |
| -docker run -it --rm -v $PWD:/work -e "VERSION_TAG=dev" fontcc contents::IosevkaSS06 ttf::IosevkaSS12 webfont::IosevkaSS15 |
39 |
| -ls -lR dist/ |
40 |
| -``` |
41 |
| -### Customized Build |
42 |
| -``` |
43 |
| -cd $HOME/mycustomfonts |
44 |
| -cat myfont1.toml myfont2.toml myfont3.toml > private-build-plans.toml |
45 |
| -docker run -it --rm -v $PWD:/work fontcc ttf::myfont1 ttf::myfont2 contents::myfont3 |
46 |
| -ls -lR dist/ |
47 |
| -``` |
48 |
| -Note: You need prepare myfont1.toml myfont2.toml myfont3.toml youself, The [Customizer](https://be5invis.github.io/Iosevka/customizer) can help you easily generate font configuration file `.toml`. |
| 1 | +## Make docker image |
| 2 | +``` |
| 3 | +git clone --depth=1 https://github.com/be5invis/Iosevka.git $HOME/mkdkimg |
| 4 | +cd $HOME/mkdkimg/docker |
| 5 | +docker build -t=fontcc . |
| 6 | +docker images | grep fontcc # Confirm that the docker image is generated successfully |
| 7 | +fontcc latest c847d5e08886 About a minute ago 491MB |
| 8 | +cd ../.. |
| 9 | +rm -rf mkdkimg/ |
| 10 | +``` |
| 11 | +Note: Make docker image need execute only one time. |
| 12 | + |
| 13 | +## Usage |
| 14 | +`docker run -it --rm -v $PWD:/work fontcc <BUILD_ARGS>` |
| 15 | +Please refer to the `<BUILD_ARGS>` parameters to [Customized Build](../../dev/doc/custom-build.md#customized-build) |
| 16 | +### Optional parameters (put them before `fontcc`): |
| 17 | +1. `-e "VERSION_TAG=<tag>"` |
| 18 | + |
| 19 | +`<tag>` can be the following values |
| 20 | +- `main` git main branch |
| 21 | +- `dev` git dev branch |
| 22 | +- `v28.0.5` git [release version tags](../../../tags) |
| 23 | + |
| 24 | +When this variable is omitted, the tag of the latest release will be selected |
| 25 | + |
| 26 | +2. `-e "NPM_REG=<npm repository mirror url>"` |
| 27 | + |
| 28 | +change `npm install` download repository to mirror site. |
| 29 | + |
| 30 | +eg. change npm repos to huawei mirror |
| 31 | + `docker run -it --rm -v $PWD:/work -e "NPM_REG=https://mirrors.huaweicloud.com/repository/npm" fontcc contents::Iosevka` |
| 32 | + |
| 33 | +## Example |
| 34 | +### Partially Build dev branch |
| 35 | +``` |
| 36 | +mkdir -p $HOME/build_fonts |
| 37 | +cd $HOME/build_fonts |
| 38 | +docker run -it --rm -v $PWD:/work -e "VERSION_TAG=dev" fontcc contents::IosevkaSS06 ttf::IosevkaSS12 webfont::IosevkaSS15 |
| 39 | +ls -lR dist/ |
| 40 | +``` |
| 41 | +### Customized Build |
| 42 | +``` |
| 43 | +cd $HOME/mycustomfonts |
| 44 | +cat myfont1.toml myfont2.toml myfont3.toml > private-build-plans.toml |
| 45 | +docker run -it --rm -v $PWD:/work fontcc ttf::myfont1 ttf::myfont2 contents::myfont3 |
| 46 | +ls -lR dist/ |
| 47 | +``` |
| 48 | +Note: You need prepare myfont1.toml myfont2.toml myfont3.toml youself, The [Customizer](https://be5invis.github.io/Iosevka/customizer) can help you easily generate font configuration file `.toml`. |
0 commit comments