Hugo Dark Theme Site Generator https://after-dark.habd.as
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Dockerfile 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #
  2. # Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
  3. #
  4. # This file is part of After Dark.
  5. #
  6. # After Dark is free software: you can redistribute it and/or modify
  7. # it under the terms of the GNU Affero General Public License as published
  8. # by the Free Software Foundation, either version 3 of the License, or
  9. # (at your option) any later version.
  10. #
  11. # After Dark is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU Affero General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU Affero General Public License
  17. # along with this program. If not, see <https://www.gnu.org/licenses/>.
  18. #
  19. # DOCKER-VERSION 17.12.0-ce, build c97c6d6
  20. # Pull hugo builder base image
  21. FROM golang:1.10.3-alpine3.7 AS hugobuilder
  22. # Set environment variables for hugo build
  23. ENV HUGO_VERSION=0.44 \
  24. CGO_ENABLED=0 \
  25. GOOS=linux
  26. # Build hugo from source using specified version
  27. RUN \
  28. apk add --update --no-cache git musl-dev && \
  29. git clone https://github.com/gohugoio/hugo.git $GOPATH/src/github.com/gohugoio/hugo && \
  30. cd ${GOPATH:-$HOME/go}/src/github.com/gohugoio/hugo && \
  31. git checkout v$HUGO_VERSION && \
  32. go get github.com/golang/dep/cmd/dep && \
  33. dep ensure -vendor-only && \
  34. go install -ldflags '-s -w'
  35. # Move compiled binary into own container
  36. FROM scratch
  37. COPY --from=hugobuilder /go/bin/hugo /hugo
  38. ENTRYPOINT ["/hugo"]
  39. CMD ["--help"]