Added post social image

This commit is contained in:
2020-09-14 20:43:52 +01:00
parent 3bf8fc61c5
commit 6d1b7ff397
8 changed files with 210 additions and 1 deletions

View File

@@ -1,3 +1,11 @@
FROM golang:1.14-alpine as go-builder
ENV GO111MODULE=on
WORKDIR /app
ADD social-image-gen .
RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-w -s" -o social-image-gen main.go
FROM debian:buster AS builder
RUN apt-get -qq update \
@@ -11,8 +19,13 @@ RUN curl -sL -o /tmp/hugo.deb \
dpkg -i /tmp/hugo.deb && \
rm /tmp/hugo.deb
COPY --from=go-builder /app/social-image-gen /social-image-gen
WORKDIR /app
ADD . .
ADD ./social-image-gen/fonts/ /fonts
RUN /social-image-gen --mode posts
RUN hugo -d /usr/share/nginx/html/
FROM nginx:latest