Sign inSign up

deemetreeats11/alpine-google-fonts

By deemetreeats11

•Updated almost 7 years ago

One Alpine docker as a source for popular google fonts.

Image
1

5.8K

deemetreeats11/alpine-google-fonts repository overview

⁠:mountain_cableway: alpine-google-fonts

One Alpine docker as a source for popular google fonts.

⁠Font source

Downloading fonts from the official google font repository: https://fonts.google.com/?sort=popularity⁠

⁠Default included fonts

⁠Usage

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!"

⁠Building your own

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⁠

Tag summary

Content type

Image

Digest

Size

8.4 MB

Last updated

almost 7 years ago

docker pull deemetreeats11/alpine-google-fonts