anchor.diff:    && mkdir -p /gollum/wiki && mkdir -p /gollum/config \
     # Create caddyfile that can be mounted when running
     && touch /gollum/config/Caddyfile \
  -  # Create base folder for startup script.
  -  && mkdir /app \
     # Make dirs world-writeable. On Openshift this won't run as user defined bellow...
     && chmod a+rw /app \
     && chmod -R a+rw /gollum/ \
  
positive.code:   && setcap cap_net_bind_service=+ep $(which caddy) \
    && chmod +rx /startup.sh
  
  COPY Caddyfile /app
  WORKDIR  app
  
  EXPOSE 80
  
negative.code: # Build caddy from source, because binaries are published under a commercial license: https://caddyserver.com/pricing
  FROM golang:1.10.0 as caddybuild
  ARG CADDY_VERSION="0.10.14"
  RUN git clone https://github.com/mholt/caddy /go/src/github.com/mholt/caddy
  WORKDIR  /go/src/github.com/mholt/caddy
  RUN git checkout tags/"v$CADDY_VERSION" -b "v$CADDY_VERSION"
    # Build Plugins http.login and http.jwt
    #&& sed -e 's/\(\s\)"github.com\/mholt\/caddy\/caddyfile"/\1"github.com\/mholt\/caddy\/caddyfile"\n\1"github.com\/BTBurke\/caddy-jwt"\n\1"github.com\/tarent\/loginsrv/'
  RUN printf " \
    package caddyhttp \n\
    import (  \n\
      // http.jwt  \n\
      _ \"github.com/BTBurke/caddy-jwt\"  \n\
      // http.login  \n\
      _ \"github.com/tarent/loginsrv/caddy\" \n\
    )" > /go/src/github.com/mholt/caddy/caddyhttp/plugins.go
  RUN go get -d -v github.com/caddyserver/builds
  WORKDIR /go/src/github.com/mholt/caddy/caddy
  RUN go get ./...
  RUN go run build.go
  RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o caddy .
  
  # Build gollum galore
  # As of 10/2018 ruby 2.3 seems the be te latest ruby version provided with The latest alpine 3.8
  