mirror of
https://github.com/grafana/grafana.git
synced 2024-11-29 20:24:18 -06:00
6e313e7d37
Removes all references and usage of PhantomJS #23375. Remove direct link rendered image e2e smoke test for now. Docker: Fix installing chrome in ubuntu custom docker image. Improve handling of image renderer not available/installed #23593. Add PhantomJS breaking change and upgrading notes. Use grabpl v0.2.10. Closes #13802 Co-authored-by: Kyle Brandt <kyle@grafana.com> Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com> Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
83 lines
2.3 KiB
Docker
83 lines
2.3 KiB
Docker
# Golang build container
|
|
FROM golang:1.14.1-alpine
|
|
|
|
RUN apk add --no-cache gcc g++
|
|
|
|
WORKDIR $GOPATH/src/github.com/grafana/grafana
|
|
|
|
COPY go.mod go.sum ./
|
|
COPY vendor vendor
|
|
|
|
RUN go mod verify
|
|
|
|
COPY pkg pkg
|
|
COPY build.go package.json ./
|
|
|
|
RUN go run build.go build
|
|
|
|
# Node build container
|
|
FROM node:12.13.0-alpine
|
|
|
|
WORKDIR /usr/src/app/
|
|
|
|
COPY package.json yarn.lock ./
|
|
COPY packages packages
|
|
|
|
RUN yarn install --pure-lockfile --no-progress
|
|
|
|
COPY Gruntfile.js tsconfig.json .eslintrc .editorconfig .browserslistrc ./
|
|
COPY public public
|
|
COPY scripts scripts
|
|
COPY emails emails
|
|
|
|
ENV NODE_ENV production
|
|
RUN ./node_modules/.bin/grunt build
|
|
|
|
# Final container
|
|
FROM alpine:3.10
|
|
|
|
LABEL maintainer="Grafana team <hello@grafana.com>"
|
|
|
|
ARG GF_UID="472"
|
|
ARG GF_GID="472"
|
|
|
|
ENV PATH="/usr/share/grafana/bin:$PATH" \
|
|
GF_PATHS_CONFIG="/etc/grafana/grafana.ini" \
|
|
GF_PATHS_DATA="/var/lib/grafana" \
|
|
GF_PATHS_HOME="/usr/share/grafana" \
|
|
GF_PATHS_LOGS="/var/log/grafana" \
|
|
GF_PATHS_PLUGINS="/var/lib/grafana/plugins" \
|
|
GF_PATHS_PROVISIONING="/etc/grafana/provisioning"
|
|
|
|
WORKDIR $GF_PATHS_HOME
|
|
|
|
RUN apk add --no-cache ca-certificates bash tzdata && \
|
|
apk add --no-cache --upgrade --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main openssl musl-utils
|
|
|
|
COPY conf ./conf
|
|
|
|
RUN mkdir -p "$GF_PATHS_HOME/.aws" && \
|
|
addgroup -S -g $GF_GID grafana && \
|
|
adduser -S -u $GF_UID -G grafana grafana && \
|
|
mkdir -p "$GF_PATHS_PROVISIONING/datasources" \
|
|
"$GF_PATHS_PROVISIONING/dashboards" \
|
|
"$GF_PATHS_PROVISIONING/notifiers" \
|
|
"$GF_PATHS_LOGS" \
|
|
"$GF_PATHS_PLUGINS" \
|
|
"$GF_PATHS_DATA" && \
|
|
cp "$GF_PATHS_HOME/conf/sample.ini" "$GF_PATHS_CONFIG" && \
|
|
cp "$GF_PATHS_HOME/conf/ldap.toml" /etc/grafana/ldap.toml && \
|
|
chown -R grafana:grafana "$GF_PATHS_DATA" "$GF_PATHS_HOME/.aws" "$GF_PATHS_LOGS" "$GF_PATHS_PLUGINS" "$GF_PATHS_PROVISIONING" && \
|
|
chmod -R 777 "$GF_PATHS_DATA" "$GF_PATHS_HOME/.aws" "$GF_PATHS_LOGS" "$GF_PATHS_PLUGINS" "$GF_PATHS_PROVISIONING"
|
|
|
|
COPY --from=0 /go/src/github.com/grafana/grafana/bin/linux-amd64/grafana-server /go/src/github.com/grafana/grafana/bin/linux-amd64/grafana-cli ./bin/
|
|
COPY --from=1 /usr/src/app/public ./public
|
|
COPY --from=1 /usr/src/app/tools ./tools
|
|
|
|
EXPOSE 3000
|
|
|
|
COPY ./packaging/docker/run.sh /run.sh
|
|
|
|
USER grafana
|
|
ENTRYPOINT [ "/run.sh" ]
|