mirror of
https://github.com/openziti/zrok.git
synced 2024-12-22 06:40:50 +01:00
also build the console in local dev cross-builder
This commit is contained in:
parent
32c6f07b3e
commit
251eb6ed31
2
.gitignore
vendored
2
.gitignore
vendored
@ -28,6 +28,8 @@ go.work
|
||||
go.work.sum
|
||||
zrok-venv
|
||||
|
||||
# cache used by local dev cross-build script
|
||||
/.npm
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
@ -1,3 +1,4 @@
|
||||
# Stage 1: Install Node.js with nvm
|
||||
FROM debian:bullseye-slim
|
||||
#
|
||||
# this file mirrors the build params used in the GitHub Actions and enables
|
||||
@ -12,23 +13,31 @@ ARG go_root=/usr/local/go
|
||||
ARG go_cache=/usr/share/go_cache
|
||||
ARG uid=1000
|
||||
ARG gid=1000
|
||||
RUN apt-get -y update
|
||||
RUN apt-get -y install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf gcc-aarch64-linux-gnu
|
||||
RUN apt-get -y install wget build-essential
|
||||
RUN apt-get -y update \
|
||||
&& apt-get -y install \
|
||||
gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf gcc-aarch64-linux-gnu \
|
||||
wget build-essential
|
||||
|
||||
COPY ./linux-build.sh /usr/local/bin/
|
||||
RUN wget -q https://go.dev/dl/${go_distribution_file}
|
||||
RUN tar -xzf ${go_distribution_file} -C /usr/local/
|
||||
|
||||
RUN wget -qO- https://deb.nodesource.com/setup_18.x | bash \
|
||||
&& apt-get -y update \
|
||||
&& apt-get -y install \
|
||||
nodejs
|
||||
|
||||
RUN mkdir ${go_path} ${go_cache}
|
||||
RUN chown -R ${uid}:${gid} ${go_path} ${go_cache}
|
||||
|
||||
COPY ./linux-build.sh /usr/local/bin/
|
||||
|
||||
USER ${uid}:${gid}
|
||||
ENV TARGETARCH=${TARGETARCH}
|
||||
ENV GOPATH=${go_path}
|
||||
ENV GOROOT=${go_root}
|
||||
ENV GOCACHE=${go_cache}
|
||||
ENV PATH=${go_path}/bin:${go_root}/bin:$PATH
|
||||
|
||||
RUN go install github.com/mitchellh/gox@latest
|
||||
WORKDIR /mnt
|
||||
ENTRYPOINT ["linux-build.sh"]
|
||||
|
@ -6,7 +6,10 @@
|
||||
#
|
||||
#
|
||||
|
||||
set -o pipefail -e -u
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
set -o xtrace
|
||||
|
||||
# if no architectures supplied then default list of three
|
||||
if (( ${#} )); then
|
||||
@ -31,6 +34,16 @@ else
|
||||
PROCS_PER_JOB=0 # invokes gox default to use all CPUs-1
|
||||
fi
|
||||
|
||||
(
|
||||
HOME=/tmp/builder
|
||||
# Navigate to the "ui" directory and run npm commands
|
||||
npm config set cache /mnt/.npm
|
||||
cd ./ui/
|
||||
mkdir -p $HOME
|
||||
npm install
|
||||
npm run build
|
||||
)
|
||||
|
||||
for ARCH in ${JOBS[@]}; do
|
||||
GOX_CMD="
|
||||
gox \
|
||||
|
Loading…
Reference in New Issue
Block a user