-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from theleagueof/docker
- Loading branch information
Showing
5 changed files
with
88 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
FROM archlinux AS fontship-base | ||
|
||
# Setup Caleb's hosted Arch repository with prebuilt dependencies | ||
RUN pacman-key --init && pacman-key --populate | ||
RUN sed -i /etc/pacman.conf -e \ | ||
'/^.community/{n;n;s!^!\n\[alerque\]\nServer = https://arch.alerque.com/$arch\n!}' | ||
RUN pacman-key --recv-keys 63CC496475267693 && pacman-key --lsign-key 63CC496475267693 | ||
|
||
# Freshen all base system packages | ||
RUN pacman --needed --noconfirm -Syuq && yes | pacman -Sccq | ||
|
||
# Install fontship run-time dependecies | ||
RUN pacman --needed --noconfirm -Syq \ | ||
font-v git make python zsh \ | ||
python-{ufonormalizer,font{make,tools}} \ | ||
&& yes | pacman -Sccq | ||
|
||
# Setup separate image to build fontship so we don't bloat the final image | ||
FROM fontship-base AS fontship-builder | ||
|
||
# Install build time dependecies | ||
RUN pacman --needed --noconfirm -Syq base-devel && yes | pacman -Sccq | ||
|
||
# Set at build time, forces Docker's layer caching to reset at this point | ||
ARG VCS_REF=0 | ||
|
||
COPY ./ /src | ||
WORKDIR /src | ||
|
||
RUN git clean -dxf ||: | ||
RUN git fetch --unshallow ||: | ||
RUN git fetch --tags ||: | ||
|
||
RUN ./bootstrap.sh | ||
RUN ./configure | ||
RUN make | ||
RUN make install DESTDIR=/pkgdir | ||
|
||
FROM fontship-base AS fontship | ||
|
||
LABEL maintainer="Caleb Maclennan <[email protected]>" | ||
LABEL version="$VCS_REF" | ||
|
||
COPY build-aux/docker-entrypoint.sh /usr/local/bin | ||
|
||
COPY --from=fontship-builder /pkgdir / | ||
|
||
WORKDIR /data | ||
ENTRYPOINT ["docker-entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env sh | ||
|
||
set -e | ||
|
||
if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ]; then | ||
set -- fontship "$@" | ||
fi | ||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters