前置き

出来たもの

FROM ruby:2.3.1-alpine

RUN \
  # Refresh package list
  apk update \
  # Install build dependencies
  && apk add --no-cache --virtual build-deps \
  # Equivalent of Debian's build-essential
    alpine-sdk \
  # Install actual dependencies
  && apk add --no-cache git icu-dev libidn-dev ruby-dev\
  # add package for wikicloth
  && gem install idn-ruby\
  # version
  && gem install twitter-text -v "1.14.7"\
  # Install Gollum and associated packages
  && gem install gollum github-markdown asciidoctor creole org-ruby RedCloth\
  # Install wikicloth
  && gem install wikicloth \
  # Clean up build dependencies
  && apk del build-deps

# Create volume at /wiki
VOLUME /wiki
WORKDIR /wiki

# Expose default gollum port 4567

ENTRYPOINT ["/usr/local/bundle/bin/gollum", "/wiki", "--port", "4567"]
EXPOSE 4567

苦労した点

  • buildが通らなかった
ERROR:  Error installing wikicloth:
ERROR: Failed to build gem native extension.

最後に

https://github.com/zachlatta/gollum-docker/blob/master/Dockerfileで, zachlatta/gollum-dockerにDockerhubないなって思って自分でbulidしたのに, Readme読んだら思いっきり"docker pull zachlatta/gollum"って書いてあるやんっていう…

日曜一日無駄にしてしまった…