mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-22 10:15:35 +01:00
d42c34786f
* This makes changes makes it possible to build the spectral image also on ARM architecture. * no message Signed-off-by: Vadim Bauer <vb@container-registry.com> * fix issue Signed-off-by: Vadim Bauer <vb@container-registry.com> --------- Signed-off-by: Vadim Bauer <vb@container-registry.com>
18 lines
566 B
Docker
18 lines
566 B
Docker
ARG GOLANG
|
|
FROM ${GOLANG}
|
|
|
|
ARG SPECTRAL_VERSION
|
|
RUN case "$(dpkg --print-architecture)" in \
|
|
amd64) ARCH="x64" ;; \
|
|
arm64) ARCH="arm64" ;; \
|
|
*) echo "Unsupported architecture" && exit 1 ;; \
|
|
esac && \
|
|
echo "Architecture: $ARCH" && \
|
|
echo "Spectral version: $SPECTRAL_VERSION" && \
|
|
URL="https://github.com/stoplightio/spectral/releases/download/$SPECTRAL_VERSION/spectral-linux-$ARCH" && \
|
|
echo "URL: $URL" && \
|
|
curl -fsSL -o /usr/bin/spectral $URL && chmod +x /usr/bin/spectral
|
|
|
|
ENTRYPOINT ["/usr/bin/spectral"]
|
|
CMD ["--version"]
|