grafana / grafana-docker

Grafana docker container
Other
645 stars 378 forks source link

dpkg-deb: error #72

Closed maheshmadpathi closed 7 years ago

maheshmadpathi commented 7 years ago

I'm getting below error while building grafana image on docker toolbox

dpkg-deb: error: `/tmp/grafana.deb' is not a debian format archive
dpkg: error processing archive /tmp/grafana.deb (--install):
 subprocess dpkg-deb --control returned error exit status 2
Errors were encountered while processing:
 /tmp/grafana.deb

below is Dockerfile

FROM debian:jessie

ARG GRAFANA_VERSION

RUN apt-get update && \
    apt-get -y --no-install-recommends install libfontconfig curl ca-certificates && \
    apt-get clean && \
    curl https://grafanarel.s3.amazonaws.com/builds/grafana_${GRAFANA_VERSION}_amd64.deb > /tmp/grafana.deb && \
    dpkg -i /tmp/grafana.deb && \
    rm /tmp/grafana.deb && \
    curl -L https://github.com/tianon/gosu/releases/download/1.7/gosu-amd64 > /usr/sbin/gosu && \
    chmod +x /usr/sbin/gosu && \
    apt-get remove -y curl && \
    apt-get autoremove -y && \
    rm -rf /var/lib/apt/lists/*

VOLUME ["/var/lib/grafana", "/var/log/grafana", "/etc/grafana"]

EXPOSE 3000

COPY ./run.sh /run.sh

ENTRYPOINT ["/run.sh"]

any clue?

jangaraj commented 7 years ago

Probably line curl https://grafanarel.s3.amazonaws.com/builds/grafana_${GRAFANA_VERSION}_amd64.deb has a problem. There is build argument used. Did you pass that argument? For example:

docker build --build-arg GRAFANA_VERSION=latest .
maheshmadpathi commented 7 years ago

:satisfied: it works now.. Thanks a lot!