mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
CI: Upgrade the build Docker image (#27337)
* CI: Upgrade the build Docker image Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> * CI: Upgrade osxcross and Apple SDK Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
# Use old Debian (this has support into 2022) in order to ensure binary compatibility with older glibc's.
|
||||
FROM debian:stretch-20200803-slim AS toolchain
|
||||
|
||||
ENV OSX_SDK_URL=https://s3.dockerproject.org/darwin/v2 \
|
||||
OSX_SDK=MacOSX10.10.sdk \
|
||||
OSX_MIN=10.10 \
|
||||
ARG OSX_SDK_URL
|
||||
|
||||
ENV OSX_MIN=10.10 \
|
||||
CTNG=1.24.0 \
|
||||
OSX_CROSS_REV=542acc2ef6c21aeb3f109c03748b1015a71fed63
|
||||
# This is the last revision that builds on Debian Stretch
|
||||
OSX_CROSS_REV=a1d7d7a8d569f9f0b8c3140b8b32848dbcd62afa
|
||||
|
||||
# Use ARG so as not to persist environment variable in image
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
@@ -37,6 +38,7 @@ WORKDIR /tmp
|
||||
RUN apt-get update && \
|
||||
apt-get install -yq \
|
||||
clang patch libxml2-dev \
|
||||
build-essential \
|
||||
ca-certificates \
|
||||
curl \
|
||||
git \
|
||||
@@ -47,10 +49,10 @@ RUN apt-get update && \
|
||||
lzma-dev
|
||||
RUN git clone https://github.com/tpoechtrager/osxcross.git /tmp/osxcross && \
|
||||
cd /tmp/osxcross && git reset --hard $OSX_CROSS_REV
|
||||
RUN curl -fL ${OSX_SDK_URL}/${OSX_SDK}.tar.xz -o /tmp/osxcross/tarballs/${OSX_SDK}.tar.xz
|
||||
RUN curl -fL "${OSX_SDK_URL}" -o /tmp/osxcross/tarballs/$(echo "${OSX_SDK_URL}" | grep -E 'MacOSX[^?]+' -o)
|
||||
RUN ln -s /usr/bin/llvm-dsymutil-6.0 /usr/bin/dsymutil
|
||||
RUN UNATTENDED=yes OSX_VERSION_MIN=${OSX_MIN} /tmp/osxcross/build.sh
|
||||
RUN rm -rf /tmp/osxcross/target/SDK/${OSX_SDK}/usr/share && \
|
||||
RUN UNATTENDED=1 OSX_VERSION_MIN=${OSX_MIN} /tmp/osxcross/build.sh
|
||||
RUN rm -rf /tmp/osxcross/target/SDK/*/usr/share && \
|
||||
cd /tmp && \
|
||||
tar cfJ osxcross.tar.xz osxcross/target && \
|
||||
rm -rf /tmp/osxcross
|
||||
|
||||
@@ -21,4 +21,8 @@ The image is based on Debian Stretch, since we want an older Linux distribution
|
||||
|
||||
## Build/Publish Docker Image
|
||||
In order to build and publish the Grafana build Docker image, execute the following:
|
||||
`./build-deploy.sh`.
|
||||
|
||||
```
|
||||
export OSX_SDK_URL=<f.ex. signed GCS URL to download OSX SDK>
|
||||
./build-deploy.sh
|
||||
```
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
|
||||
_version="1.2.24"
|
||||
_version="1.2.26"
|
||||
_tag="grafana/build-container:${_version}"
|
||||
|
||||
_dpath=$(dirname "${BASH_SOURCE[0]}")
|
||||
cd "$_dpath"
|
||||
|
||||
docker build -t $_tag .
|
||||
if [[ -z "${OSX_SDK_URL}" ]]; then
|
||||
echo You must set OSX_SDK_URL
|
||||
exit 1
|
||||
fi
|
||||
|
||||
docker build --build-arg OSX_SDK_URL="${OSX_SDK_URL}" -t $_tag .
|
||||
docker push $_tag
|
||||
|
||||
Reference in New Issue
Block a user