Added brook.sh

This commit is contained in:
Teddysun
2020-02-19 21:39:43 +09:00
parent 5c1fca46e2
commit 0a85587a89
3 changed files with 69 additions and 12 deletions

View File

@@ -3,15 +3,19 @@
# Reference URL:
# https://github.com/txthinking/brook
FROM --platform=$TARGETPLATFORM golang:alpine as builder
RUN set -ex && apk add --update git \
&& go get -u -v github.com/txthinking/brook/cli/brook
FROM --platform=$TARGETPLATFORM alpine:latest
FROM --platform=${TARGETPLATFORM} alpine:latest
LABEL maintainer="Teddysun <i@teddysun.com>"
COPY --from=builder /go/bin/brook /usr/bin
ARG TARGETPLATFORM
WORKDIR /root
COPY brook.sh /root/brook.sh
RUN set -ex \
&& apk add --no-cache tzdata \
&& chmod +x /root/brook.sh \
&& /root/brook.sh "${TARGETPLATFORM}" \
&& rm -fv /root/brook.sh
ENV TZ=Asia/Shanghai
ENV ARGS="server -l :9000 -p password0"
CMD brook $ARGS