#-------------------------------------------------------------- # #. Tiny Static Web Server (writtren in Golang) 6MB # # Oject : test web server for MRZ # date : 2020.04.13 # author: ctxwing # #reference: "goStatic" #. : A really small static web server for Docker : 6MB.. 9 명 개발자 . 다운로드 5M+ . # [1] https://github.com/PierreZ/goStatic #. [2] https://hub.docker.com/r/pierrezemb/gostatic # author : ctxwing # #------------------------------------------------------------- # Dockerfile @ https://hub.docker.com/r/pierrezemb/gostatic # stage 0 #FROM golang:latest as builder #WORKDIR /go/src/github.com/PierreZ/goStatic #COPY . . #RUN mkdir ./bin && \ # CGO_ENABLED=0 GOARCH=amd64 GOOS=linux go build -tags netgo -installsuffix netgo -o ./bin/goStatic && \ # mkdir ./bin/etc && \ # ID=$(shuf -i 100-9999 -n 1) && \ # echo $ID && \ # echo "appuser:x:$ID:$ID::/sbin/nologin:/bin/false" > ./bin/etc/passwd && \ # echo "appgroup:x:$ID:appuser" > ./bin/etc/group # ## stage 1 #FROM scratch #WORKDIR / #COPY --from=builder /go/src/github.com/PierreZ/goStatic/bin/ . #USER appuser #------------------------------------------------------------- #docker run -d -p 80:8043 -v path/to/website:/srv/http --name goStatic pierrezemb/gostatic # docker pull pierrezemb/gostatic # docker pull pierrezemb/gostatic:latest FROM pierrezemb/gostatic:latest # Container timezone setting # 출처: https://devcoding.tistory.com/46 #ENV TZ=Asia/Seoul #RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone ENTRYPOINT ["/goStatic"] EXPOSE 80