2018-06-13 01:38:02 +00:00
|
|
|
FROM xena/go:1.10 AS build
|
2018-03-24 02:17:22 +00:00
|
|
|
RUN apk --no-cache add make git
|
|
|
|
RUN mkdir -p /usr/local/src \
|
|
|
|
&& git clone https://github.com/jroimartin/sw /usr/local/src/sw \
|
|
|
|
&& cd /usr/local/src/sw && make && make install PREFIX=/usr/local \
|
|
|
|
&& GOBIN=/usr/local/bin go get github.com/russross/blackfriday-tool \
|
|
|
|
&& go get github.com/rakyll/statik
|
|
|
|
COPY . /site
|
|
|
|
RUN set -x \
|
|
|
|
&& cd /site \
|
|
|
|
&& sw site
|
|
|
|
|
|
|
|
COPY ./vendor/ /root/go/src
|
|
|
|
COPY ./cmd /root/go/src/git.xeserv.us/xena/tulpaforce.tk/cmd
|
|
|
|
ENV CGO_ENABLED 0
|
|
|
|
RUN cd /root/go/src/git.xeserv.us/xena/tulpaforce.tk/cmd/sserver \
|
|
|
|
&& /root/go/bin/statik -src /site/site.static \
|
|
|
|
&& go build \
|
|
|
|
&& GOBIN=/usr/local/bin go install
|
|
|
|
|
|
|
|
FROM alpine:3.7
|
2018-06-13 01:38:02 +00:00
|
|
|
|
|
|
|
COPY CHECKS /app/CHECKS
|
|
|
|
COPY --from=build /usr/local/bin/sserver /tftk
|
2018-03-24 02:17:22 +00:00
|
|
|
EXPOSE 80
|
|
|
|
CMD /tftk
|