mirror of
https://github.com/linuxserver/docker-hubstats.git
synced 2026-02-20 02:46:07 +08:00
some Dockerfile tidying and using variables for package versions
This commit is contained in:
parent
d9144067c1
commit
bb761166ce
76
Dockerfile
76
Dockerfile
@ -9,6 +9,10 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA
|
||||
# environment settings
|
||||
ARG DEBIAN_FRONTEND="noninteractive"
|
||||
|
||||
# package versions
|
||||
ARG GRAFANA_VER="4.1.2-1486989747"
|
||||
ARG INFLUX_VER="1.2.0"
|
||||
|
||||
# build packages as variable
|
||||
ARG BUILD_PACKAGES="\
|
||||
apt-transport-https \
|
||||
@ -18,6 +22,8 @@ ARG BUILD_PACKAGES="\
|
||||
cpp-5 \
|
||||
dh-python \
|
||||
distro-info-data \
|
||||
fontconfig-config \
|
||||
fonts-dejavu-core \
|
||||
g++ \
|
||||
g++-5 \
|
||||
gcc \
|
||||
@ -28,18 +34,22 @@ ARG BUILD_PACKAGES="\
|
||||
icu-devtools \
|
||||
libasan2 \
|
||||
libatomic1 \
|
||||
libc-dev-bin \
|
||||
libc6-dev \
|
||||
libcc1-0 \
|
||||
libc-dev-bin \
|
||||
libcilkrts5 \
|
||||
liberror-perl \
|
||||
libexpat1 \
|
||||
libfontconfig \
|
||||
libfontconfig1 \
|
||||
libfreetype6 \
|
||||
libgcc-5-dev \
|
||||
libgdbm3 \
|
||||
libgmp-dev \
|
||||
libgmpxx4ldbl \
|
||||
libgomp1 \
|
||||
libicu-dev \
|
||||
libicu55 \
|
||||
libicu-dev \
|
||||
libisl15 \
|
||||
libitm1 \
|
||||
liblsan0 \
|
||||
@ -49,9 +59,10 @@ ARG BUILD_PACKAGES="\
|
||||
libmpx0 \
|
||||
libperl5.22 \
|
||||
libpng12-0 \
|
||||
libpython3-stdlib \
|
||||
libpng12-0 \
|
||||
libpython3.5-minimal \
|
||||
libpython3.5-stdlib \
|
||||
libpython3-stdlib \
|
||||
libquadmath0 \
|
||||
libruby2.3 \
|
||||
libstdc++-5-dev \
|
||||
@ -69,8 +80,8 @@ ARG BUILD_PACKAGES="\
|
||||
libxml2 \
|
||||
libxml2-dev \
|
||||
libxrender1 \
|
||||
libxslt1-dev \
|
||||
libxslt1.1 \
|
||||
libxslt1-dev \
|
||||
libxss1 \
|
||||
libyaml-0-2 \
|
||||
linux-libc-dev \
|
||||
@ -80,35 +91,28 @@ ARG BUILD_PACKAGES="\
|
||||
perl \
|
||||
perl-modules-5.22 \
|
||||
python3 \
|
||||
python3-minimal \
|
||||
python3.5 \
|
||||
python3.5-minimal \
|
||||
python3-minimal \
|
||||
rake \
|
||||
ri \
|
||||
ruby \
|
||||
ruby-dev \
|
||||
ruby-did-you-mean \
|
||||
ruby-full \
|
||||
ruby-minitest \
|
||||
ruby-net-telnet \
|
||||
ruby-power-assert \
|
||||
ruby-test-unit \
|
||||
ruby2.3 \
|
||||
ruby2.3-dev \
|
||||
ruby2.3-doc \
|
||||
ruby2.3-tcltk \
|
||||
ruby-dev \
|
||||
ruby-did-you-mean \
|
||||
ruby-full \
|
||||
rubygems-integration \
|
||||
ruby-minitest \
|
||||
ruby-net-telnet \
|
||||
ruby-power-assert \
|
||||
ruby-test-unit \
|
||||
ucf \
|
||||
wget \
|
||||
x11-common \
|
||||
zlib1g-dev \
|
||||
fontconfig-config \
|
||||
fonts-dejavu-core \
|
||||
libexpat1 \
|
||||
libfontconfig1 \
|
||||
libfontconfig \
|
||||
libfreetype6 \
|
||||
libpng12-0 \
|
||||
ucf"
|
||||
zlib1g-dev"
|
||||
|
||||
# copy app and excludes
|
||||
COPY root/ /
|
||||
@ -121,10 +125,8 @@ RUN \
|
||||
--no-install-recommends \
|
||||
$BUILD_PACKAGES && \
|
||||
|
||||
|
||||
|
||||
# install ruby app gems
|
||||
cd /opt/dockerhub-stats/ && \
|
||||
cd /opt/dockerhub-stats/ && \
|
||||
echo 'gem: --no-document' > \
|
||||
/etc/gemrc && \
|
||||
gem install bundler && \
|
||||
@ -142,26 +144,30 @@ cd /opt/dockerhub-stats/ && \
|
||||
libfreetype6 \
|
||||
libpng12-0 \
|
||||
netcat \
|
||||
wget \
|
||||
ruby && \
|
||||
ruby \
|
||||
wget && \
|
||||
|
||||
cd /tmp; wget https://dl.influxdata.com/influxdb/releases/influxdb_1.2.0_amd64.deb; dpkg -i influxdb_1.2.0_amd64.deb && \
|
||||
cd /tmp; wget https://grafanarel.s3.amazonaws.com/builds/grafana_4.1.2-1486989747_amd64.deb; dpkg -i grafana_4.1.2-1486989747_amd64.deb && apt-get -f install && \
|
||||
# install influxdb and grafana
|
||||
curl -o \
|
||||
/tmp/influxdb.deb \
|
||||
"https://dl.influxdata.com/influxdb/releases/influxdb_${INFLUX_VER}_amd64.deb" && \
|
||||
dpkg -i /tmp/influxdb.deb && \
|
||||
curl -o \
|
||||
/tmp/grafana.deb \
|
||||
"https://grafanarel.s3.amazonaws.com/builds/grafana_${GRAFANA_VER}_amd64.deb" && \
|
||||
dpkg -i /tmp/grafana.deb && \
|
||||
apt-get -f install && \
|
||||
|
||||
# clean up
|
||||
rm -rf \
|
||||
/root \
|
||||
/tmp/* \
|
||||
/var/lib/apt/lists/* \
|
||||
/var/tmp/* && \
|
||||
find /root -name . -o -prune -exec rm -rf -- {} + && \
|
||||
find /var/lib/gems -name "cache" -type d -exec rm -rf -- {} + && \
|
||||
mkdir -p \
|
||||
/root && \
|
||||
chmod 744 /etc/cron.d/dockerhub-stats
|
||||
|
||||
# import grafana dashboard
|
||||
# ADD ./grafana/dash.json /var/lib/grafana/dashboards/dash.json
|
||||
chmod 744 /etc/cron.d/dockerhub-stats
|
||||
|
||||
# ports and volumes
|
||||
#WORKDIR /opt/docker-readme-sync
|
||||
EXPOSE 3000 8083 8086
|
||||
VOLUME /config
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user