Change: order PATH, force new golang version

master
Siroco 1 year ago
parent 77db62b837
commit fceb514fca
Signed by: siroco
GPG Key ID: 1324098302A514B0
  1. 14
      Dockerfile

@ -2,20 +2,19 @@ FROM registry.sindominio.net/debian as builder
ARG TAGS="bindata"
RUN echo "deb http://deb.debian.org/debian bullseye-backports main contrib non-free" >> /etc/apt/sources.list && \
apt-get update
RUN apt-get install -y --no-install-recommends \
make build-essential jq gnupg curl nodejs npm wget
RUN apt-get update && \
apt-get install -y --no-install-recommends make build-essential jq gnupg curl nodejs npm wget
## Install Go 1.17 via Go web
RUN wget https://golang.org/dl/go1.17.1.linux-amd64.tar.gz && \
echo "dab7d9c34361dc21ec237d584590d72500652e7c909bf082758fb63064fca0ef go1.17.1.linux-amd64.tar.gz" > go.checksum && \
sha256sum -c go.checksum && \
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.17.1.linux-amd64.tar.gz && \
export PATH=$PATH:/usr/local/go/bin && \
rm -rf /usr/local/go && \
rm -rf /usr/bin/go && \
tar -C /usr/local -xzf go1.17.1.linux-amd64.tar.gz && \
export PATH=/usr/local/go/bin:$PATH && \
go version
COPY gitea-key.asc /key.asc
RUN TGZ=`curl -s https://api.github.com/repos/go-gitea/gitea/releases/latest |jq -r '.assets[].browser_download_url' | grep 'src.*\.tar\.gz$'` && \
curl -L ${TGZ} > /gitea.tar.gz && \
@ -30,6 +29,7 @@ WORKDIR /gitea
# Don't clean the prebuild javascript assets
# npm fails to build them
#RUN make clean-all build
RUN which go
RUN make build
FROM registry.sindominio.net/debian

Loading…
Cancel
Save