Skip to content

Instantly share code, notes, and snippets.

@lethee
Last active August 6, 2023 18:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lethee/7ec7652f144c09a012af to your computer and use it in GitHub Desktop.
Save lethee/7ec7652f144c09a012af to your computer and use it in GitHub Desktop.
progit2-ko-build-docker

Pro Git v2 Korean Build Docker Script

Build Image

docker build -t progit2-build-docker .

Run Image

docker run -i -t -p 8000:8000 progit2-build-docker

Debug With Shell

docker run -i -t -p 8000:8000 progit2-build-docker bash
FROM ubuntu:14.04
MAINTAINER Seonghwan Lee <lethee@gmail.com>
RUN cd /etc/apt && \
sed -i 's/archive.ubuntu.com/kr.archive.ubuntu.com/g' sources.list
RUN apt-get update
RUN apt-get install -y git curl python
RUN apt-get install -y ruby2.0 ruby2.0-dev
RUN rm /usr/bin/ruby /usr/bin/irb /usr/bin/gem
RUN ln -s /usr/bin/ruby2.0 /usr/bin/ruby
RUN ln -s /usr/bin/irb2.0 /usr/bin/irb
RUN ln -s /usr/bin/gem2.0 /usr/bin/gem
RUN gem update --system
RUN gem install bundler
RUN apt-get install -y zlib1g-dev make
RUN gem install nokogiri -v '1.6.3.1'
RUN git clone https://github.com/lethee/progit2-ko-1.git -b build /progit2-ko
WORKDIR /progit2-ko
RUN bundler install
RUN gem install asciidoctor-pdf-cjk-kai_gen_gothic
#RUN asciidoctor-pdf-cjk-kai_gen_gothic-install
RUN curl -L https://github.com/akiratw/kaigen-gothic/raw/master/dist/KR/KaiGenGothicKR-Regular.ttf -o /var/lib/gems/2.0.0/gems/asciidoctor-pdf-cjk-kai_gen_gothic-0.1.0/data/fonts/KaiGenGothicKR-Regular.ttf
RUN curl -L https://github.com/akiratw/kaigen-gothic/raw/master/dist/KR/KaiGenGothicKR-Bold.ttf -o /var/lib/gems/2.0.0/gems/asciidoctor-pdf-cjk-kai_gen_gothic-0.1.0/data/fonts/KaiGenGothicKR-Bold.ttf
RUN cp /var/lib/gems/2.0.0/gems/asciidoctor-pdf-cjk-kai_gen_gothic-0.1.0/data/fonts/KaiGenGothicKR-Regular.ttf /var/lib/gems/2.0.0/gems/asciidoctor-pdf-cjk-kai_gen_gothic-0.1.0/data/fonts/KaiGenGothicKR-Regular-Italic.ttf
RUN curl -L https://github.com/chrissimpkins/codeface/raw/master/fonts/roboto-mono/RobotoMono-Regular.ttf -o /var/lib/gems/2.0.0/gems/asciidoctor-pdf-cjk-kai_gen_gothic-0.1.0/data/fonts/RobotoMono-Regular.ttf
RUN curl -L https://github.com/chrissimpkins/codeface/raw/master/fonts/roboto-mono/RobotoMono-Italic.ttf -o /var/lib/gems/2.0.0/gems/asciidoctor-pdf-cjk-kai_gen_gothic-0.1.0/data/fonts/RobotoMono-Italic.ttf
RUN curl -L https://github.com/chrissimpkins/codeface/raw/master/fonts/roboto-mono/RobotoMono-Bold.ttf -o /var/lib/gems/2.0.0/gems/asciidoctor-pdf-cjk-kai_gen_gothic-0.1.0/data/fonts/RobotoMono-Bold.ttf
RUN git config --global user.email test@test.test
RUN git config --global user.name test
CMD git pull origin build && \
git fetch https://github.com/progit/progit2-ko.git master && \
git merge --no-edit -Xtheirs FETCH_HEAD && \
rake book:build && \
python -m SimpleHTTPServer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment