fix: dockerfile

This commit is contained in:
xuthus5 2023-10-21 15:08:54 +08:00
parent 59a0efe59a
commit 998e154bdb
Signed by: xuthus5
GPG Key ID: A23CF9620CBB55F9

View File

@ -1,19 +1,9 @@
FROM fedora:latest
FROM images.local/golang: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 buf generate --exclude-path node_modules
RUN buf generate
RUN cd webui && npm install && npm run build &&\
cd .. && go mod tidy && go build .