-
-
Notifications
You must be signed in to change notification settings - Fork 154
/
Dockerfile
36 lines (24 loc) · 703 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# syntax=docker/dockerfile:1
ARG GOLANG_VER=1.21
FROM golang:${GOLANG_VER}-alpine AS build
# See https://cloud.docker.com/repository/docker/jdkato/vale
# TODO: DITA / XML:
# openjdk11 \
# libxslt \
# COPY bin/dita-ot-3.6 /
#
# This currently isn't packaged because it makes the size 7x as big.
# Debug shell: $ docker run -it --entrypoint /bin/sh jdkato/vale -s
RUN apk add build-base
COPY . /app/
WORKDIR /app
ENV CGO_ENABLED=1
ARG ltag
RUN go build -ldflags "-s -w -X main.version=$ltag" -o /app/vale ./cmd/vale
FROM alpine
RUN apk add --no-cache \
py3-docutils \
asciidoctor
COPY --from=build /app/vale /bin
# ENV PATH="/bin:/dita-ot-3.6/bin:$PATH"
ENTRYPOINT ["/bin/vale"]