-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
48 lines (36 loc) · 1.16 KB
/
Dockerfile
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# FROM golang:alpine AS build
# WORKDIR /src/
# COPY . /src/
# # Install git.
# # Git is required for fetching the dependencies.
# RUN apk update && apk add --no-cache git
# RUN apk add build-base
# RUN apk add --no-cache ffmpeg
# RUN CGO_ENABLED=0 GOOS=linux go build -tags nolibopusfile -o dcb .
# FROM scratch
# COPY --from=build /src/dcb /dcb
# #ENTRYPOINT ["./bin/app"]
# CMD ["./dcb"]
# RUN mkdir -p /go/src/app
# WORKDIR /go/src/app
# CMD ["go-wrapper", "run"]
# COPY . /go/src/app
# RUN go-wrapper download
# RUN go-wrapper install
# Choose any golang image, just make sure it doesn't have -onbuild
FROM golang:1.16.3
RUN apt-get update && apt-get -y install libopus-dev libopusfile-dev ca-certificates curl bash git xz-utils
# custom golang?
WORKDIR /tmp
RUN curl -L -O https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-amd64-static.tar.xz
RUN tar -xf ffmpeg-git-amd64-static.tar.xz && \
cd ff* && mv ff* /usr/local/bin
WORKDIR /
# Everything below is copied manually from the official -onbuild image,
# with the ONBUILD keywords removed.
RUN mkdir -p /go/src/app
WORKDIR /go/src/app
COPY . /go/src/app
RUN go get
RUN go install
CMD ["go", "run", "main.go"]