grafana/create_bundles_in_container.sh
Andreas Gerstmayr 15e6076b1d partially revert NODE_OPTIONS settings
Partially revert ffa6c2bb08

The OpenSSL legacy provider is not available in the F35 container and
not required.
2022-09-07 13:51:58 +02:00

25 lines
757 B
Bash
Executable File

#!/bin/bash -eu
#
# create vendor and webpack bundles inside a container for reproducibility
# using a Go cache:
# ./create_bundles_in_container.sh --security-opt label=disable -v $(pwd)/.gocache:/root/go
#
cat <<EOF | podman build -t grafana-build -f - .
FROM fedora:35
RUN dnf upgrade -y && \
dnf install -y rpmdevtools python3-packaging python3-pyyaml make golang nodejs yarnpkg
# https://groups.google.com/g/golang-nuts/c/MVtHZUtZru4
ENV GOPROXY=https://proxy.golang.org,direct
WORKDIR /tmp/grafana-build
COPY Makefile grafana.spec *.patch build_frontend.sh list_bundled_nodejs_packages.py .
RUN mkdir bundles
CMD make && mv *.tar.* bundles
EOF
podman run --name grafana-build --replace "$@" grafana-build
podman cp grafana-build:bundles/. .