21 lines
719 B
Docker
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" ]
|