One Alpine docker as a source for popular google fonts.
5.8K
One Alpine docker as a source for popular google fonts.
Downloading fonts from the official google font repository: https://fonts.google.com/?sort=popularity
Can be used as a base image in multistage builds for an easy supply of fonts.
#### Font supply image
FROM deemetreeats11/alpine-google-fonts AS font_supply
RUN ls /usr/share/fonts/ && echo "done!"
### Runtime stage
FROM alpine:edge AS runtime
# Font copy
COPY --from=font_supply /usr/share/fonts/ /usr/share/fonts/
# Optional validation
RUN apk add fontconfig && fc-list && apk del fontconfig
# Output:
# /usr/share/fonts/ttf-roboto/Roboto-Light.ttf: Roboto,Roboto Light:style=Light,Regular
# /usr/share/fonts/ttf-montserrat/Montserrat-Italic.ttf: Montserrat:style=Italic
# ...
RUN echo "done!"
Clone the repo, modify required_fonts.txt document with needed font families, run docker build.
$ clone [email protected]:deemetree_at_satelligence/alpine-google-fonts.git
$ cd alpine-google-fonts
# Let's suppose we want to install only Oswald
# https://fonts.google.com/specimen/Oswald
$ echo Oswald > required_fonts.txt
$ docker build -t $USER/alpine-google-fonts .
Source code can be found at this GitLab Repository
Content type
Image
Digest
Size
8.4 MB
Last updated
almost 7 years ago
docker pull deemetreeats11/alpine-google-fonts