-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-test
25 lines (20 loc) · 972 Bytes
/
Dockerfile-test
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
ARG GO_VERSION=1.23
ARG IMG_VERSION=1.23
FROM golang:${GO_VERSION} AS builder
WORKDIR /go/src/github.com/ancientlore/whisper
COPY . .
RUN go version
RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go get .
RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go install
#FROM ancientlore/goimg:${IMG_VERSION}
FROM golang:${GO_VERSION}
RUN apt-get install apt-transport-https ca-certificates gnupg
RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
RUN apt-get update && apt-get install -y google-cloud-sdk
COPY --from=builder /go/bin/whisper /usr/local/bin/whisper
COPY example/static/dog.png /home/www/whisper.png
COPY example/.index-docker.md /home/www/index.md
EXPOSE 8080
ENV ROOT=/home/www
ENTRYPOINT ["/usr/local/bin/whisper"]