spruce/docker/Dockerfile
Dan Anglin 69c3165fc1
build: replace make with mage
- Replace the makefile with the magefile
- Update the Dockerfile
- Update go.mod
2023-08-11 14:59:21 +01:00

36 lines
739 B
Docker

# syntax=docker/dockerfile:1
FROM golang:1.21-buster AS spruce-builder
ENV CGO_ENABLED=0
ENV GOOS=linux
ENV GOARCH=amd64
COPY . /workspace
WORKDIR /workspace
RUN go build -a -v -o /workspace/spruce
FROM alpine:3.18
COPY --from=spruce-builder /workspace/spruce /usr/local/bin
# Install dependencies
RUN apk upgrade --no-cache \
&& apk add \
font-carlito \
aspell \
curl \
&& mkdir /opt/context /workspace
ENV OSFONTDIR=/usr/share/fonts
WORKDIR /opt/context
# Install ConTeXt standalone
RUN curl -LO http://lmtx.pragma-ade.com/install-lmtx/context-linuxmusl.zip \
&& unzip context-linuxmusl.zip \
&& sh install.sh
ENV PATH=${PATH}:/opt/context/tex/texmf-linuxmusl/bin
WORKDIR /workspace