Blame SOURCES/create_bundles_in_container.sh

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