-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile.bak
23 lines (23 loc) · 943 Bytes
/
Dockerfile.bak
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM golang:1.22.2-bookworm
# 已经测试过alpine
LABEL authors="zen"
RUN cp /etc/apt/sources.list.d/debian.sources /etc/apt/sources.list.d/debian.sources.bak
RUN sed -i 's/deb.debian.org/mirrors4.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list.d/debian.sources
RUN apt update
RUN apt install -y dos2unix
RUN go env -w GO111MODULE=on
RUN go env -w GOPROXY=https://goproxy.cn,direct
RUN go env -w GOBIN=/root/go/bin
RUN mkdir -p /root/app
WORKDIR /root/app
COPY . .
RUN dos2unix /root/app/install-retry.sh
RUN chmod +x /root/app/install-retry.sh
RUN /root/app/install-retry.sh ffmpeg nano mediainfo build-essential
RUN go build -o /usr/local/bin/conv main.go
RUN chmod +x /usr/local/bin/conv
WORKDIR /usr/local/bin
CMD ["conv"]
# docker build -t videos:latest .
# docker run --name video -d -v /d/backup/.telegram:/data videos:latest
# docker run -itd --cpus=1 --memory=2048M --name test -v /f/large/bodysuit:/data test:5