pastebin/Dockerfile
2023-09-30 21:47:59 +08:00

21 lines
719 B
Docker

FROM fedora:latest
WORKDIR /app
ENV GOPROXY https://goproxy.cn
RUN sed -e 's|^metalink=|#metalink=|g' \
-e 's|^#baseurl=http://download.example/pub/fedora/linux|baseurl=https://mirrors.ustc.edu.cn/fedora|g' \
-i.bak \
/etc/yum.repos.d/fedora.repo \
/etc/yum.repos.d/fedora-modular.repo \
/etc/yum.repos.d/fedora-updates.repo \
/etc/yum.repos.d/fedora-updates-modular.repo &&\
dnf update -y && dnf install golang nodejs gcc make -y &&\
npm config set registry https://registry.npm.taobao.org
COPY . /app
RUN cd webui && npm install && npm run build &&\
cd .. && go mod tidy && go build .
EXPOSE 38080
ENTRYPOINT [ "./pastebin", "api" ]