update Dockerfile

pull/1203/head
vvisionnn 4 years ago committed by GitHub
parent 565f3f6c43
commit d0c01e9551

@ -1,21 +1,20 @@
FROM golang:alpine as cloudreve_builder FROM golang:alpine as cloudreve_builder
WORKDIR /cloudreve_builder
# install dependencies and build tools # install dependencies and build tools
RUN apk update && apk add --no-cache wget curl git yarn build-base gcc abuild binutils binutils-doc gcc-doc RUN apk update && apk add --no-cache wget curl git yarn build-base gcc abuild binutils binutils-doc gcc-doc
# build frontend WORKDIR /cloudreve_builder
RUN git clone --recurse-submodules https://github.com/cloudreve/Cloudreve.git RUN git clone --recurse-submodules https://github.com/cloudreve/Cloudreve.git
RUN cd ./Cloudreve/assets \
&& yarn --update-checksums \ # build frontend
&& yarn install --network-timeout 1000000 \ WORKDIR /cloudreve_builder/Cloudreve/assets
&& yarn run build RUN yarn install --network-timeout 1000000
RUN yarn run build
# build backend # build backend
RUN cd ./Cloudreve \ WORKDIR /cloudreve_builder/Cloudreve
&& go get github.com/rakyll/statik \ RUN go get github.com/rakyll/statik \
&& statik -src=assets/build/ -include=*.html,*.js,*.json,*.css,*.png,*.svg,*.ico -f \ && statik -src=assets/build/ -include=*.html,*.js,*.json,*.css,*.png,*.svg,*.ico -f \
&& tag_name=$(git describe --tags) \ && tag_name=$(git describe --tags) \
&& export COMMIT_SHA=$(git rev-parse --short HEAD) \ && export COMMIT_SHA=$(git rev-parse --short HEAD) \

Loading…
Cancel
Save