forked from mpdred/semantic-tagger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
53 lines (32 loc) · 906 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# ---
FROM golang AS dependencies
WORKDIR /app
RUN apt update > /dev/null \
&& apt install -y make > /dev/null
COPY go.* ./
COPY Makefile ./
RUN make dependencies
# ---
FROM dependencies AS base
COPY . .
# ---
FROM base AS test
RUN make test
# ---
FROM base AS build
RUN make build-linux
# ---
FROM alpine AS final
WORKDIR /app
RUN apk add --no-cache \
bash git openssh-client ca-certificates
COPY --from=build /app/bin/semtag /usr/local/bin
COPY --from=test /app/README.md ./
RUN chmod +x /usr/local/bin/semtag
LABEL description="Set up versioning by using git tags or files"
LABEL documentation="https://github.com/mpdred/semantic-tagger/blob/master/README.md"
LABEL maintainer="https://github.com/mpdred"
LABEL name="semantic-tagger"
LABEL source="https://github.com/mpdred/semantic-tagger"
LABEL url="https://hub.docker.com/r/mpdred/semantic-tagger"
ENTRYPOINT "/bin/bash"