Last active
August 29, 2015 14:16
-
-
Save azam/d500562529f30085dd7f to your computer and use it in GitHub Desktop.
FontCustom container on Debian 7
This file contains hidden or 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
# (c) Azamshul Azizy, 2015 | |
# | |
# Debian based container for fontcustom | |
# Ref: https://github.com/FontCustom/fontcustom/ | |
# Ref: http://pivotallabs.com/generate-icon-fonts-automatically-with-fontcustom/ | |
# | |
# TODO: install ttf2eot | |
# | |
# Usage example: | |
# docker run -v /home/me/svgs:/target -t azamshul/fontcustom compile /target --output /target/output | |
# Pull base image. | |
FROM debian:7 | |
MAINTAINER Azamshul Azizy <[email protected]> | |
# Add apt sources | |
RUN \ | |
echo "deb http://ftp.us.debian.org/debian/ wheezy main contrib non-free" > /etc/apt/sources.list && \ | |
echo "deb-src http://ftp.us.debian.org/debian/ wheezy main contrib non-free" >> /etc/apt/sources.list && \ | |
echo "deb http://security.debian.org/ wheezy/updates main contrib non-free" >> /etc/apt/sources.list && \ | |
echo "deb-src http://security.debian.org/ wheezy/updates main contrib non-free" >> /etc/apt/sources.list && \ | |
echo "deb http://ftp.us.debian.org/debian/ wheezy-updates main contrib non-free" >> /etc/apt/sources.list && \ | |
echo "deb-src http://ftp.us.debian.org/debian/ wheezy-updates main contrib non-free" >> /etc/apt/sources.list && \ | |
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" >> /etc/apt/sources.list && \ | |
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" >> /etc/apt/sources.list && \ | |
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 | |
ENV DEBIAN_FRONTEND noninteractive | |
# Update apt packages | |
RUN \ | |
apt-get update && \ | |
apt-get -y upgrade && \ | |
apt-get -y dist-upgrade | |
# Install required packages | |
RUN \ | |
apt-get -y install sudo build-essential zlib1g zlib1g-dev ruby1.9.1 ruby1.9.1-dev rubygems1.9.1 irb1.9.1 ri1.9.1 rdoc1.9.1 libopenssl-ruby1.9.1 libssl-dev wget unzip fontforge ttfautohint && \ | |
wget http://people.mozilla.com/~jkew/woff/woff-code-latest.zip && \ | |
unzip woff-code-latest.zip -d sfnt2woff && \ | |
cd sfnt2woff && \ | |
make && \ | |
mv sfnt2woff /usr/local/bin/ && \ | |
gem install fontcustom | |
# Set up users | |
RUN \ | |
groupadd -g 433 -r appuser && \ | |
mkdir /home/appuser && \ | |
useradd -u 431 -r -g appuser -d /home/appuser -s /sbin/nologin -c "appuser" appuser && \ | |
chown -R appuser:appuser /home/appuser | |
# Clean up | |
RUN \ | |
rm -rf /var/lib/apt/lists/* && \ | |
rm -rf woff-code-latest.zip && \ | |
rm -rf sfnt2woff && \ | |
apt-get clean | |
# Change user | |
USER appuser | |
# Define working directory | |
WORKDIR /home/appuser | |
# Define default command. | |
CMD ["fontcustom compile /data"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment