<commit_before># Go2o Docker Image
# Version 1.0
# Author : jarrysix(<EMAIL>)
# Date : 2019-06-12 13:20

FROM golang:latest AS build
ENV GOPATH=/gobuild
COPY ./app ./app
COPY ./core ./core
COPY ./assets ./assets
COPY ./*.go go.mod LICENSE README.md app.conf ./

ENV GOPROXY=https://goproxy.cn,direct
RUN rm -rf go.sum && sed -i 's/replace github.com\/ixre/\/\/replace  github.com\/ixre/g' go.mod && \
    go mod tidy && \
    CGO_ENABLED=0 GOOS=linux ARCH=amd64 go build -o go2o go2o-serve.go && \
    mkdir -p /opt/go2o/dist && \
    cp -r go2o LICENSE README.md app.conf /opt/go2o/dist

FROM alpine
MAINTAINER jarrysix
LABEL vendor="Go2o"
LABEL version="1.0.0"

ENV GO2O_NATS_ADDR=172.17.0.1:4222

WORKDIR /app
COPY --from=build /opt/go2o/dist/* /app/

RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories && \
	apk --update add tzdata ca-certificates && \
	cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && apk del tzdata && \
	ln -s /app/go2o /bin && \
    echo "if [ ! -f '/data/app.conf' ];then cp -r /app/app.conf /data;fi;"\
    "go2o -conf /data/app.conf -d"> /docker-boot.sh
VOLUME ["/data"]
EXPOSE 1427 1428
CMD ["sh","/docker-boot.sh"]

<commit_msg>Dockerfile<commit_after># Go2o Docker Image
# Version 1.0
# Author : jarrysix(<EMAIL>)
# Date : 2019-06-12 13:20

FROM golang:latest AS build
ENV GOPATH=/gobuild
COPY ./app ./app
COPY ./core ./core
COPY ./*.go go.mod LICENSE README.md app.conf ./

ENV GOPROXY=https://goproxy.cn,direct
RUN rm -rf go.sum && sed -i 's/replace github.com\/ixre/\/\/replace  github.com\/ixre/g' go.mod && \
    go mod tidy && \
    CGO_ENABLED=0 GOOS=linux ARCH=amd64 go build -o go2o go2o-serve.go && \
    mkdir -p /opt/go2o/dist && \
    cp -r go2o LICENSE README.md app.conf /opt/go2o/dist

FROM alpine
MAINTAINER jarrysix
LABEL vendor="Go2o"
LABEL version="1.0.0"

ENV GO2O_NATS_ADDR=172.17.0.1:4222

WORKDIR /app
COPY --from=build /opt/go2o/dist/* /app/
COPY ./assets ./assets

RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories && \
	apk --update add tzdata ca-certificates && \
	cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && apk del tzdata && \
	ln -s /app/go2o /bin && \
    echo "if [ ! -f '/data/app.conf' ];then cp -r /app/app.conf /data;fi;"\
    "go2o -conf /data/app.conf -d"> /docker-boot.sh
VOLUME ["/data"]
EXPOSE 1427 1428
CMD ["sh","/docker-boot.sh"]


{'fraction_non_alphanumeric': 0.17511520737327188, 'fraction_numerical': 0.04189359028068706, 'mean_word_length': 2.8330658105939004, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1935905', 'n_tokens_mistral': 1085, 'n_tokens_neox': 993, 'n_words': 244}