Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
5f7e6a5c
Commit
5f7e6a5c
authored
Dec 20, 2018
by
Johannes Würbach
Committed by
Leonard Gram
Jan 09, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Docker image for ARM
parent
ba197733
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
89 additions
and
33 deletions
+89
-33
.circleci/config.yml
+22
-22
build.go
+2
-0
packaging/docker/Dockerfile
+4
-2
packaging/docker/build.sh
+29
-5
packaging/docker/push_to_docker_hub.sh
+25
-4
scripts/build/build.sh
+7
-0
No files found.
.circleci/config.yml
View file @
5f7e6a5c
...
...
@@ -200,47 +200,47 @@ jobs:
-
dist/grafana*
grafana-docker-master
:
docker
:
-
image
:
docker:stable-git
machine
:
image
:
circleci/classic:201808-01
steps
:
-
checkout
-
attach_workspace
:
at
:
.
-
setup_remote_docker
-
run
:
docker info
-
run
:
cp dist/grafana-latest.linux-x64.tar.gz packaging/docker
-
run
:
docker run --privileged linuxkit/binfmt:v0.6
-
run
:
cp dist/grafana-latest.linux-*.tar.gz packaging/docker
-
run
:
cd packaging/docker && ./build-deploy.sh "master-${CIRCLE_SHA1}"
-
run
:
rm packaging/docker/grafana-latest.linux-
x64
.tar.gz
-
run
:
rm packaging/docker/grafana-latest.linux-
*
.tar.gz
-
run
:
cp enterprise-dist/grafana-enterprise-*.linux-amd64.tar.gz packaging/docker/grafana-latest.linux-x64.tar.gz
-
run
:
cd packaging/docker && ./build-enterprise.sh "master"
grafana-docker-pr
:
docker
:
-
image
:
docker:stable-git
machine
:
image
:
circleci/classic:201808-01
steps
:
-
checkout
-
attach_workspace
:
at
:
.
-
setup_remote_docker
-
run
:
docker info
-
run
:
cp dist/grafana-latest.linux-x64.tar.gz packaging/docker
-
run
:
docker run --privileged linuxkit/binfmt:v0.6
-
run
:
cp dist/grafana-latest.linux-*.tar.gz packaging/docker
-
run
:
cd packaging/docker && ./build.sh "${CIRCLE_SHA1}"
grafana-docker-release
:
docker
:
-
image
:
docker:stable-git
steps
:
-
checkout
-
attach_workspace
:
at
:
.
-
setup_remote_docker
-
run
:
docker info
-
run
:
cp dist/grafana-latest.linux-x64
.tar.gz packaging/docker
-
run
:
cd packaging/docker && ./build-deploy.sh "${CIRCLE_TAG}"
-
run
:
rm packaging/docker/grafana-latest.linux-x64
.tar.gz
-
run
:
cp enterprise-dist/grafana-enterprise-*.linux-amd64.tar.gz packaging/docker/grafana-latest.linux-x64.tar.gz
-
run
:
cd packaging/docker && ./build-enterprise.sh "${CIRCLE_TAG}"
machine
:
image
:
circleci/classic:201808-01
steps
:
-
checkout
-
attach_workspace
:
at
:
.
-
run
:
docker info
-
run
:
docker run --privileged linuxkit/binfmt:v0.6
-
run
:
cp dist/grafana-latest.linux-*
.tar.gz packaging/docker
-
run
:
cd packaging/docker && ./build-deploy.sh "${CIRCLE_TAG}"
-
run
:
rm packaging/docker/grafana-latest.linux-*
.tar.gz
-
run
:
cp enterprise-dist/grafana-enterprise-*.linux-amd64.tar.gz packaging/docker/grafana-latest.linux-x64.tar.gz
-
run
:
cd packaging/docker && ./build-enterprise.sh "${CIRCLE_TAG}"
build-enterprise
:
docker
:
...
...
build.go
View file @
5f7e6a5c
...
...
@@ -164,6 +164,8 @@ func makeLatestDistCopies() {
"_amd64.deb"
:
"dist/grafana_latest_amd64.deb"
,
".x86_64.rpm"
:
"dist/grafana-latest-1.x86_64.rpm"
,
".linux-amd64.tar.gz"
:
"dist/grafana-latest.linux-x64.tar.gz"
,
".linux-armv7.tar.gz"
:
"dist/grafana-latest.linux-armv7.tar.gz"
,
".linux-arm64.tar.gz"
:
"dist/grafana-latest.linux-arm64.tar.gz"
,
}
for
_
,
file
:=
range
files
{
...
...
packaging/docker/Dockerfile
View file @
5f7e6a5c
FROM
debian:stretch-slim
ARG
BASE_IMAGE=debian:stretch-slim
FROM
${BASE_IMAGE}
ARG
GRAFANA_TGZ="grafana-latest.linux-x64.tar.gz"
...
...
@@ -10,7 +11,8 @@ COPY ${GRAFANA_TGZ} /tmp/grafana.tar.gz
RUN
mkdir /tmp/grafana
&&
tar
xfvz /tmp/grafana.tar.gz
--strip-components
=
1
-C
/tmp/grafana
FROM
debian:stretch-slim
ARG
BASE_IMAGE=debian:stretch-slim
FROM
${BASE_IMAGE}
ARG
GF_UID="472"
ARG
GF_GID="472"
...
...
packaging/docker/build.sh
View file @
5f7e6a5c
...
...
@@ -13,13 +13,37 @@ fi
echo
"Building
${
_docker_repo
}
:
${
_grafana_version
}
"
docker build
\
--tag
"
${
_docker_repo
}
:
${
_grafana_version
}
"
\
--no-cache
=
true
.
export
DOCKER_CLI_EXPERIMENTAL
=
enabled
# Build grafana image for a specific arch
docker_build
()
{
base_image
=
$1
grafana_tgz
=
$2
tag
=
$3
docker build
\
--build-arg
BASE_IMAGE
=
${
base_image
}
\
--build-arg
GRAFANA_TGZ
=
${
grafana_tgz
}
\
--tag
"
${
tag
}
"
\
--no-cache
=
true
.
}
# Tag docker images of all architectures
docker_tag_all
()
{
repo
=
$1
tag
=
$2
docker tag
"
${
_docker_repo
}
:
${
_grafana_version
}
"
"
${
repo
}
:
${
tag
}
"
docker tag
"
${
_docker_repo
}
-arm32v7-linux:
${
_grafana_version
}
"
"
${
repo
}
-arm32v7-linux:
${
tag
}
"
docker tag
"
${
_docker_repo
}
-arm64v8-linux:
${
_grafana_version
}
"
"
${
repo
}
-arm64v8-linux:
${
tag
}
"
}
docker_build
"debian:stretch-slim"
"grafana-latest.linux-x64.tar.gz"
"
${
_docker_repo
}
:
${
_grafana_version
}
"
docker_build
"arm32v7/debian:stretch-slim"
"grafana-latest.linux-armv7.tar.gz"
"
${
_docker_repo
}
-arm32v7-linux:
${
_grafana_version
}
"
docker_build
"arm64v8/debian:stretch-slim"
"grafana-latest.linux-arm64.tar.gz"
"
${
_docker_repo
}
-arm64v8-linux:
${
_grafana_version
}
"
# Tag as 'latest' for official release; otherwise tag as grafana/grafana:master
if
echo
"
$_grafana_tag
"
|
grep
-q
"^v"
;
then
docker
tag
"
${
_docker_repo
}
:
${
_grafana_version
}
"
"
${
_docker_repo
}
:
latest"
docker
_tag_all
"
${
_docker_repo
}
"
"
latest"
else
docker
tag
"
${
_docker_repo
}
:
${
_grafana_version
}
"
"grafana/grafana:
master"
docker
_tag_all
"grafana/grafana"
"
master"
fi
packaging/docker/push_to_docker_hub.sh
View file @
5f7e6a5c
...
...
@@ -12,13 +12,34 @@ else
_docker_repo
=
${
2
:-
grafana
/grafana-dev
}
fi
export
DOCKER_CLI_EXPERIMENTAL
=
enabled
echo
"pushing
${
_docker_repo
}
:
${
_grafana_version
}
"
docker push
"
${
_docker_repo
}
:
${
_grafana_version
}
"
docker_push_all
()
{
repo
=
$1
tag
=
$2
# Push each image individually
docker push
"
${
repo
}
:
${
tag
}
"
docker push
"
${
repo
}
-arm32v7-linux:
${
tag
}
"
docker push
"
${
repo
}
-arm64v8-linux:
${
tag
}
"
# Create and push a multi-arch manifest
docker manifest create
"
${
repo
}
:
${
tag
}
"
\
"
${
repo
}
:
${
tag
}
"
\
"
${
repo
}
-arm32v7-linux:
${
tag
}
"
\
"
${
repo
}
-arm64v8-linux:
${
tag
}
"
docker manifest push
"
${
repo
}
:
${
tag
}
"
}
docker_push_all
"
${
_docker_repo
}
"
"
${
_grafana_version
}
"
if
echo
"
$_grafana_tag
"
|
grep
-q
"^v"
&&
echo
"
$_grafana_tag
"
|
grep
-vq
"beta"
;
then
echo
"pushing
${
_docker_repo
}
:latest"
docker
push
"
${
_docker_repo
}
:
latest"
docker
_push_all
"
${
_docker_repo
}
"
"
latest"
elif
echo
"
$_grafana_tag
"
|
grep
-q
"master"
;
then
echo
"pushing grafana/grafana:master"
docker push grafana/grafana:master
docker_push_all
"grafana/grafana"
"master"
fi
scripts/build/build.sh
View file @
5f7e6a5c
...
...
@@ -8,6 +8,8 @@ set -e
EXTRA_OPTS
=
"
$@
"
CCARMV7
=
arm-linux-gnueabihf-gcc
CCARM64
=
aarch64-linux-gnu-gcc
CCX64
=
/tmp/x86_64-centos6-linux-gnu/bin/x86_64-centos6-linux-gnu-gcc
GOPATH
=
/go
...
...
@@ -26,6 +28,9 @@ fi
echo
"Build arguments:
$OPT
"
go run build.go
-goarch
armv7
-cc
${
CCARMV7
}
${
OPT
}
build
go run build.go
-goarch
arm64
-cc
${
CCARM64
}
${
OPT
}
build
CC
=
${
CCX64
}
go run build.go
${
OPT
}
build
yarn install
--pure-lockfile
--no-progress
...
...
@@ -44,3 +49,5 @@ source /etc/profile.d/rvm.sh
echo
"Packaging"
go run build.go
-goos
linux
-pkg-arch
amd64
${
OPT
}
package-only latest
go run build.go
-goos
linux
-pkg-arch
armv7
${
OPT
}
package-only latest
go run build.go
-goos
linux
-pkg-arch
arm64
${
OPT
}
package-only latest
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment