mirror of
https://github.com/grafana/grafana.git
synced 2024-12-28 18:01:40 -06:00
170abf2e3d
* scripts/build/ci-build: Fix Makefile * scripts/build/ci-build: Base Docker image on Debian Stretch * scripts/build/ci-build: Modify Dockerfile for fewer RUN directives
55 lines
1.4 KiB
Makefile
55 lines
1.4 KiB
Makefile
VERSION = dev
|
|
TAG = grafana/build-container
|
|
USER_ID = $(shell id -u)
|
|
GROUP_ID = $(shell id -g)
|
|
|
|
all: build deploy
|
|
|
|
build:
|
|
docker build -t "${TAG}:${VERSION}" .
|
|
|
|
deploy:
|
|
docker push "${TAG}:${VERSION}"
|
|
|
|
run:
|
|
docker run -ti \
|
|
-e "CIRCLE_BRANCH=local" \
|
|
-e "CIRCLE_BUILD_NUM=472" \
|
|
${TAG}:${VERSION} \
|
|
bash
|
|
|
|
run-with-local-source-live:
|
|
docker run -d \
|
|
-e "CIRCLE_BRANCH=local" \
|
|
-e "CIRCLE_BUILD_NUM=472" \
|
|
-w "/go/src/github.com/grafana/grafana" \
|
|
--name grafana-build \
|
|
-v "${GOPATH}/src/github.com/grafana/grafana:/go/src/github.com/grafana/grafana" \
|
|
${TAG}:${VERSION} \
|
|
bash -c "/tmp/bootstrap.sh; mkdir /.cache; chown "${USER_ID}:${GROUP_ID}" /.cache; tail -f /dev/null"
|
|
docker exec -ti --user "${USER_ID}:${GROUP_ID}" grafana-build bash
|
|
|
|
run-with-local-source-copy:
|
|
docker run -d \
|
|
-e "CIRCLE_BRANCH=local" \
|
|
-e "CIRCLE_BUILD_NUM=472" \
|
|
-w "/go/src/github.com/grafana/grafana" \
|
|
--name grafana-build \
|
|
${TAG}:${VERSION} \
|
|
bash -c "/tmp/bootstrap.sh; tail -f /dev/null"
|
|
docker cp "${GOPATH}/src/github.com/grafana/grafana" grafana-build:/go/src/github.com/grafana/
|
|
docker exec -ti grafana-build bash
|
|
|
|
update-source:
|
|
docker cp "${GOPATH}/src/github.com/grafana/grafana" grafana-build:/go/src/github.com/grafana/
|
|
|
|
attach:
|
|
docker exec -ti grafana-build bash
|
|
|
|
attach-live:
|
|
docker exec -ti --user "${USER_ID}:${GROUP_ID}" grafana-build bash
|
|
|
|
stop:
|
|
docker kill grafana-build
|
|
docker rm grafana-build
|