-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
45 lines (34 loc) · 1.25 KB
/
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
# Use golang to build the bot binary, and then add it to the fizmo-json
# image to get the complete set of tools.
# Note that this will not auto-build on Docker Hub until shortly after
# Docker 17.06.01 CE is released. (Currently slated for late July.)
FROM golang:alpine AS build
# Instead of /go/src/app, which is typical for golang and the go-wrapper helper,
# we go straight to the proper path for this tool. By doing this we avoid
# having to worry about creating the symbolic link, etc., and most go tools will
# *just work*.
WORKDIR /go/src/github.com/JaredReisinger/xyzzybot
COPY . .
RUN set -eux; \
echo "acquire tools..."; \
apk add --no-cache --virtual .build-deps \
git \
make \
; \
git clean -f -x -d; \
echo "build/install..."; \
make build; \
echo "cleanup..."; \
apk del .build-deps; \
echo "DONE";
# CMD ["go-wrapper", "run"]
FROM jaredreisinger/fizmo-json
LABEL maintainer="[email protected]" \
xyzzybot.version="0.2"
COPY --from=build /go/src/github.com/JaredReisinger/xyzzybot/xyzzybot /usr/local/bin/
RUN set -eux; \
echo "creating config directory"; \
mkdir -p /usr/local/etc/xyzzybot; \
echo "DONE";
VOLUME /usr/local/etc/xyzzybot
CMD [ "/usr/local/bin/xyzzybot" ]