Browse Source

working dockerfile for sbshttp

sungo 1 month ago
parent
commit
f394cd3246
1 changed files with 28 additions and 0 deletions
  1. 28 0
      sbshttp/Dockerfile

+ 28 - 0
sbshttp/Dockerfile

@@ -0,0 +1,28 @@
+FROM golang:1.12.4-alpine AS build
+ENV CGO_ENABLED 0
+
+ARG BRANCH="master"
+
+RUN apk add --no-cache --update make git perl-utils dep
+RUN apk add --no-cache ca-certificates
+
+ENV PATH "/go/bin:${PATH}"
+
+RUN ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime
+
+RUN go get -u github.com/alecthomas/gometalinter && gometalinter --install
+
+RUN mkdir -p /go/src/git.sungo.wtf/sungo
+WORKDIR /go/src/git.sungo.wtf/sungo/
+
+RUN git clone --branch $BRANCH https://git.sungo.wtf/sungo/sbs-http sbs-http
+WORKDIR /go/src/git.sungo.wtf/sungo/sbs-http
+
+RUN make vendor check sbshttp
+
+FROM alpine
+
+COPY --from=build /go/src/git.sungo.wtf/sungo/sbs-http/runner.sh /bin/sbshttp.sh
+COPY --from=build /go/src/git.sungo.wtf/sungo/sbs-http/sbshttp /bin/sbshttp
+
+CMD [ "/bin/sbshttp.sh" ]