linux build environment updated

This commit is contained in:
nuknal
2024-07-12 11:34:02 +08:00
parent 31887a6bfe
commit 2bc6f53acc
8 changed files with 33 additions and 24 deletions

View File

@@ -11,12 +11,17 @@ RUN cd /opt && wget https://go.dev/dl/go1.20.linux-amd64.tar.gz && \
tar -xvf go1.20.linux-amd64.tar.gz && rm go1.20.linux-amd64.tar.gz
ENV GOROOT="/opt/go" \
PATH="/opt/go/bin:${PATH}" \
GOPATH="/src/build/go"
GOPATH="/build/go"
RUN echo 'export PATH="/opt/go/bin:${PATH}"' >> /root/.bashrc
RUN cd /opt && git clone -b v0.36.1 https://github.com/hybridgroup/gocv.git && cd gocv && \
make install
# WORKDIR /src
RUN cd /opt && git clone -b v0.36.1 https://github.com/hybridgroup/gocv.git && \
cd gocv && \
awk '{gsub(/libtbb2/, "libtbbmalloc2"); gsub(/libdc1394-22-dev/, "libdc1394-dev"); print}' Makefile > Makefile.tmp && \
mv Makefile.tmp Makefile && \
make install && \
cd .. && \
rm -rf gocv
# WORKDIR /src
# COPY . .
# RUN cd /sjy01/image-proc && go mod download && make linux
CMD ["/bin/bash", "/src/build/build.sh"]