tulpaforce/Dockerfile

24 lines
677 B
Docker
Raw Normal View History

2019-09-07 15:05:44 +00:00
FROM xena/go:1.12.6 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
ENV CGO_ENABLED 0
2019-01-14 13:56:04 +00:00
WORKDIR /site
RUN cd ./cmd/sserver \
2018-03-24 02:17:22 +00:00
&& /root/go/bin/statik -src /site/site.static \
2019-01-14 15:23:57 +00:00
&& go build -mod=vendor -o sserver . \
2019-01-14 13:56:04 +00:00
&& cp sserver /usr/local/bin/sserver
2018-06-13 01:38:02 +00:00
2019-01-14 13:56:04 +00:00
FROM alpine:3.8
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