fluentd-docker-image
fluentd-docker-image copied to clipboard
dockerfile with elastic search plugin is throwing missing errors.
I am trying to run fluentd inside docker container with elastic search plugin. i tried both alpine based docker file mention in document and this debian based both throws same error.
FROM fluent/fluentd:v1.7-debian-1
# Use root account to use apt
USER root
# below RUN includes plugin as examples elasticsearch is not required
# you may customize including plugins as you wish
RUN buildDeps="sudo make gcc g++ libc-dev" \
&& apt-get update \
&& apt-get install -y --no-install-recommends $buildDeps \
&& sudo gem install fluent-plugin-elasticsearch \
&& sudo gem sources --clear-all \
&& SUDO_FORCE_REMOVE=yes \
apt-get purge -y --auto-remove \
-o APT::AutoRemove::RecommendsImportant=false \
$buildDeps \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /tmp/* /var/tmp/* /usr/lib/ruby/gems/*/cache/*.gem
COPY fluent.conf /fluentd/etc/
COPY entrypoint.sh /bin/
USER fluent
error details:
Building fluentd
Step 1/6 : FROM fluent/fluentd:v1.7-debian-1
---> e84763445474
Step 2/6 : USER root
---> Using cache
---> 4f32afef3295
Step 3/6 : RUN buildDeps="sudo make gcc g++ libc-dev" && apt-get update && apt-get install -y --no-install-recommends $buildDeps && sudo gem install fluent-plugin-elasticsearch && sudo gem sources --clear-all && SUDO_FORCE_REMOVE=yes apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $buildDeps && rm -rf /var/lib/apt/lists/* && rm -rf /tmp/* /var/tmp/* /usr/lib/ruby/gems/*/cache/*.gem
---> Running in a6a49e328198
Err:1 http://deb.debian.org/debian stretch InRelease
Temporary failure resolving 'deb.debian.org'
Err:2 http://security.debian.org/debian-security stretch/updates InRelease
Temporary failure resolving 'security.debian.org'
Err:3 http://deb.debian.org/debian stretch-updates InRelease
Temporary failure resolving 'deb.debian.org'
Reading package lists...
W: Failed to fetch http://deb.debian.org/debian/dists/stretch/InRelease Temporary failure resolving 'deb.debian.org'
W: Failed to fetch http://security.debian.org/debian-security/dists/stretch/updates/InRelease Temporary failure resolving 'security.debian.org'
W: Failed to fetch http://deb.debian.org/debian/dists/stretch-updates/InRelease Temporary failure resolving 'deb.debian.org'
W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists...
Building dependency tree...
Reading state information...
Package make is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Unable to locate package sudo
E: Package 'make' has no installation candidate
E: Unable to locate package gcc
ERROR: Service 'fluentd' failed to build: The command '/bin/sh -c buildDeps="sudo make gcc g++ libc-dev" && apt-get update && apt-get install -y --no-install-recommends $buildDeps && sudo gem install fluent-plugin-elasticsearch && sudo gem sources --clear-all && SUDO_FORCE_REMOVE=yes apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $buildDeps && rm -rf /var/lib/apt/lists/* && rm -rf /tmp/* /var/tmp/* /usr/lib/ruby/gems/*/cache/*.gem' returned a non-zero code: 100
Err:1 http://deb.debian.org/debian stretch InRelease Temporary failure resolving 'deb.debian.org' Err:2 http://security.debian.org/debian-security stretch/updates InRelease Temporary failure resolving 'security.debian.org' Err:3 http://deb.debian.org/debian stretch-updates InRelease Temporary failure resolving 'deb.debian.org' Reading package lists... W: Failed to fetch http://deb.debian.org/debian/dists/stretch/InRelease Temporary failure resolving 'deb.debian.org' W: Failed to fetch http://security.debian.org/debian-security/dists/stretch/updates/InRelease Temporary failure resolving 'security.debian.org' W: Failed to fetch http://deb.debian.org/debian/dists/stretch-updates/InRelease Temporary failure resolving 'deb.debian.org' W: Some index files failed to download. They have been ignored, or old ones used instead.
This indicates that debian package repository information is not obtained your Docker environment. Could you confirm that deb.debian.org and security.debian.org can access from your docker environment?
I couldn't reproduce this issue:
Sending build context to Docker daemon 2.56kB
Step 1/6 : FROM fluent/fluentd:v1.7-debian-1
---> e84763445474
Step 2/6 : USER root
---> Running in f9cdd47ca94d
Removing intermediate container f9cdd47ca94d
---> 0634377b440c
Step 3/6 : RUN buildDeps="sudo make gcc g++ libc-dev" && apt-get update && apt-get install -y --no-install-recommends $buildDeps && sudo gem install fluent-plugin-elasticsearch && sudo gem sources --clear-all && SUDO_FORCE_REMOVE=yes apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $buildDeps && rm -rf /var/lib/apt/lists/* && rm -rf /tmp/* /var/tmp/* /usr/lib/ruby/gems/*/cache/*.gem
---> Running in 74b1d0ad6a71
Ign:1 http://deb.debian.org/debian stretch InRelease
Get:2 http://deb.debian.org/debian stretch-updates InRelease [91.0 kB]
Get:3 http://deb.debian.org/debian stretch Release [118 kB]
Get:5 http://deb.debian.org/debian stretch Release.gpg [2365 B]
Get:4 http://security-cdn.debian.org/debian-security stretch/updates InRelease [94.3 kB]
Get:6 http://deb.debian.org/debian stretch-updates/main amd64 Packages [27.9 kB]
Get:7 http://deb.debian.org/debian stretch/main amd64 Packages [7086 kB]
Get:8 http://security-cdn.debian.org/debian-security stretch/updates/main amd64 Packages [513 kB]
Fetched 7932 kB in 1s (5966 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
libc6-dev is already the newest version (2.24-11+deb9u4).
The following additional packages will be installed:
binutils cpp cpp-6 g++-6 gcc-6 libasan3 libatomic1 libcc1-0 libcilkrts5
libgcc-6-dev libgomp1 libisl15 libitm1 liblsan0 libmpc3 libmpfr4 libmpx2
libquadmath0 libstdc++-6-dev libtsan0 libubsan0
Suggested packages:
binutils-doc cpp-doc gcc-6-locales g++-multilib g++-6-multilib gcc-6-doc
libstdc++6-6-dbg gcc-multilib manpages-dev autoconf automake libtool flex
bison gdb gcc-doc gcc-6-multilib libgcc1-dbg libgomp1-dbg libitm1-dbg
libatomic1-dbg libasan3-dbg liblsan0-dbg libtsan0-dbg libubsan0-dbg
libcilkrts5-dbg libmpx2-dbg libquadmath0-dbg libstdc++-6-doc make-doc
The following NEW packages will be installed:
binutils cpp cpp-6 g++ g++-6 gcc gcc-6 libasan3 libatomic1 libcc1-0
libcilkrts5 libgcc-6-dev libgomp1 libisl15 libitm1 liblsan0 libmpc3 libmpfr4
libmpx2 libquadmath0 libstdc++-6-dev libtsan0 libubsan0 make sudo
0 upgraded, 25 newly installed, 0 to remove and 1 not upgraded.
Need to get 31.7 MB of archives.
After this operation, 137 MB of additional disk space will be used.
Get:1 http://deb.debian.org/debian stretch/main amd64 binutils amd64 2.28-5 [3770 kB]
Get:2 http://deb.debian.org/debian stretch/main amd64 libisl15 amd64 0.18-1 [564 kB]
Get:3 http://deb.debian.org/debian stretch/main amd64 libmpfr4 amd64 3.1.5-1 [556 kB]
Get:4 http://deb.debian.org/debian stretch/main amd64 libmpc3 amd64 1.0.3-1+b2 [39.9 kB]
Get:5 http://deb.debian.org/debian stretch/main amd64 cpp-6 amd64 6.3.0-18+deb9u1 [6584 kB]
Get:6 http://deb.debian.org/debian stretch/main amd64 cpp amd64 4:6.3.0-4 [18.7 kB]
Get:7 http://deb.debian.org/debian stretch/main amd64 libcc1-0 amd64 6.3.0-18+deb9u1 [30.6 kB]
Get:8 http://deb.debian.org/debian stretch/main amd64 libgomp1 amd64 6.3.0-18+deb9u1 [73.3 kB]
Get:9 http://deb.debian.org/debian stretch/main amd64 libitm1 amd64 6.3.0-18+deb9u1 [27.3 kB]
Get:10 http://deb.debian.org/debian stretch/main amd64 libatomic1 amd64 6.3.0-18+deb9u1 [8966 B]
Get:11 http://deb.debian.org/debian stretch/main amd64 libasan3 amd64 6.3.0-18+deb9u1 [311 kB]
Get:13 http://deb.debian.org/debian stretch/main amd64 liblsan0 amd64 6.3.0-18+deb9u1 [115 kB]
Get:14 http://deb.debian.org/debian stretch/main amd64 libtsan0 amd64 6.3.0-18+deb9u1 [257 kB]
Get:15 http://deb.debian.org/debian stretch/main amd64 libubsan0 amd64 6.3.0-18+deb9u1 [107 kB]
Get:16 http://deb.debian.org/debian stretch/main amd64 libcilkrts5 amd64 6.3.0-18+deb9u1 [40.5 kB]
Get:17 http://deb.debian.org/debian stretch/main amd64 libmpx2 amd64 6.3.0-18+deb9u1 [11.2 kB]
Get:18 http://deb.debian.org/debian stretch/main amd64 libquadmath0 amd64 6.3.0-18+deb9u1 [131 kB]
Get:19 http://deb.debian.org/debian stretch/main amd64 libgcc-6-dev amd64 6.3.0-18+deb9u1 [2296 kB]
Get:12 http://security-cdn.debian.org/debian-security stretch/updates/main amd64 sudo amd64 1.8.19p1-2.1+deb9u1 [1054 kB]
Get:20 http://deb.debian.org/debian stretch/main amd64 gcc-6 amd64 6.3.0-18+deb9u1 [6900 kB]
Get:21 http://deb.debian.org/debian stretch/main amd64 gcc amd64 4:6.3.0-4 [5196 B]
Get:22 http://deb.debian.org/debian stretch/main amd64 libstdc++-6-dev amd64 6.3.0-18+deb9u1 [1420 kB]
Get:23 http://deb.debian.org/debian stretch/main amd64 g++-6 amd64 6.3.0-18+deb9u1 [7094 kB]
Get:24 http://deb.debian.org/debian stretch/main amd64 g++ amd64 4:6.3.0-4 [1546 B]
Get:25 http://deb.debian.org/debian stretch/main amd64 make amd64 4.1-9.1 [302 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 31.7 MB in 0s (43.9 MB/s)
Selecting previously unselected package binutils.
(Reading database ... 8270 files and directories currently installed.)
Preparing to unpack .../00-binutils_2.28-5_amd64.deb ...
Unpacking binutils (2.28-5) ...
Selecting previously unselected package libisl15:amd64.
Preparing to unpack .../01-libisl15_0.18-1_amd64.deb ...
Unpacking libisl15:amd64 (0.18-1) ...
Selecting previously unselected package libmpfr4:amd64.
Preparing to unpack .../02-libmpfr4_3.1.5-1_amd64.deb ...
Unpacking libmpfr4:amd64 (3.1.5-1) ...
Selecting previously unselected package libmpc3:amd64.
Preparing to unpack .../03-libmpc3_1.0.3-1+b2_amd64.deb ...
Unpacking libmpc3:amd64 (1.0.3-1+b2) ...
Selecting previously unselected package cpp-6.
Preparing to unpack .../04-cpp-6_6.3.0-18+deb9u1_amd64.deb ...
Unpacking cpp-6 (6.3.0-18+deb9u1) ...
Selecting previously unselected package cpp.
Preparing to unpack .../05-cpp_4%3a6.3.0-4_amd64.deb ...
Unpacking cpp (4:6.3.0-4) ...
Selecting previously unselected package libcc1-0:amd64.
Preparing to unpack .../06-libcc1-0_6.3.0-18+deb9u1_amd64.deb ...
Unpacking libcc1-0:amd64 (6.3.0-18+deb9u1) ...
Selecting previously unselected package libgomp1:amd64.
Preparing to unpack .../07-libgomp1_6.3.0-18+deb9u1_amd64.deb ...
Unpacking libgomp1:amd64 (6.3.0-18+deb9u1) ...
Selecting previously unselected package libitm1:amd64.
Preparing to unpack .../08-libitm1_6.3.0-18+deb9u1_amd64.deb ...
Unpacking libitm1:amd64 (6.3.0-18+deb9u1) ...
Selecting previously unselected package libatomic1:amd64.
Preparing to unpack .../09-libatomic1_6.3.0-18+deb9u1_amd64.deb ...
Unpacking libatomic1:amd64 (6.3.0-18+deb9u1) ...
Selecting previously unselected package libasan3:amd64.
Preparing to unpack .../10-libasan3_6.3.0-18+deb9u1_amd64.deb ...
Unpacking libasan3:amd64 (6.3.0-18+deb9u1) ...
Selecting previously unselected package liblsan0:amd64.
Preparing to unpack .../11-liblsan0_6.3.0-18+deb9u1_amd64.deb ...
Unpacking liblsan0:amd64 (6.3.0-18+deb9u1) ...
Selecting previously unselected package libtsan0:amd64.
Preparing to unpack .../12-libtsan0_6.3.0-18+deb9u1_amd64.deb ...
Unpacking libtsan0:amd64 (6.3.0-18+deb9u1) ...
Selecting previously unselected package libubsan0:amd64.
Preparing to unpack .../13-libubsan0_6.3.0-18+deb9u1_amd64.deb ...
Unpacking libubsan0:amd64 (6.3.0-18+deb9u1) ...
Selecting previously unselected package libcilkrts5:amd64.
Preparing to unpack .../14-libcilkrts5_6.3.0-18+deb9u1_amd64.deb ...
Unpacking libcilkrts5:amd64 (6.3.0-18+deb9u1) ...
Selecting previously unselected package libmpx2:amd64.
Preparing to unpack .../15-libmpx2_6.3.0-18+deb9u1_amd64.deb ...
Unpacking libmpx2:amd64 (6.3.0-18+deb9u1) ...
Selecting previously unselected package libquadmath0:amd64.
Preparing to unpack .../16-libquadmath0_6.3.0-18+deb9u1_amd64.deb ...
Unpacking libquadmath0:amd64 (6.3.0-18+deb9u1) ...
Selecting previously unselected package libgcc-6-dev:amd64.
Preparing to unpack .../17-libgcc-6-dev_6.3.0-18+deb9u1_amd64.deb ...
Unpacking libgcc-6-dev:amd64 (6.3.0-18+deb9u1) ...
Selecting previously unselected package gcc-6.
Preparing to unpack .../18-gcc-6_6.3.0-18+deb9u1_amd64.deb ...
Unpacking gcc-6 (6.3.0-18+deb9u1) ...
Selecting previously unselected package gcc.
Preparing to unpack .../19-gcc_4%3a6.3.0-4_amd64.deb ...
Unpacking gcc (4:6.3.0-4) ...
Selecting previously unselected package libstdc++-6-dev:amd64.
Preparing to unpack .../20-libstdc++-6-dev_6.3.0-18+deb9u1_amd64.deb ...
Unpacking libstdc++-6-dev:amd64 (6.3.0-18+deb9u1) ...
Selecting previously unselected package g++-6.
Preparing to unpack .../21-g++-6_6.3.0-18+deb9u1_amd64.deb ...
Unpacking g++-6 (6.3.0-18+deb9u1) ...
Selecting previously unselected package g++.
Preparing to unpack .../22-g++_4%3a6.3.0-4_amd64.deb ...
Unpacking g++ (4:6.3.0-4) ...
Selecting previously unselected package make.
Preparing to unpack .../23-make_4.1-9.1_amd64.deb ...
Unpacking make (4.1-9.1) ...
Selecting previously unselected package sudo.
Preparing to unpack .../24-sudo_1.8.19p1-2.1+deb9u1_amd64.deb ...
Unpacking sudo (1.8.19p1-2.1+deb9u1) ...
Setting up libquadmath0:amd64 (6.3.0-18+deb9u1) ...
Setting up libgomp1:amd64 (6.3.0-18+deb9u1) ...
Setting up libatomic1:amd64 (6.3.0-18+deb9u1) ...
Setting up libcc1-0:amd64 (6.3.0-18+deb9u1) ...
Setting up make (4.1-9.1) ...
Setting up libasan3:amd64 (6.3.0-18+deb9u1) ...
Setting up sudo (1.8.19p1-2.1+deb9u1) ...
Setting up libcilkrts5:amd64 (6.3.0-18+deb9u1) ...
Setting up libubsan0:amd64 (6.3.0-18+deb9u1) ...
Setting up libtsan0:amd64 (6.3.0-18+deb9u1) ...
Setting up liblsan0:amd64 (6.3.0-18+deb9u1) ...
Setting up libmpx2:amd64 (6.3.0-18+deb9u1) ...
Setting up libisl15:amd64 (0.18-1) ...
Processing triggers for libc-bin (2.24-11+deb9u4) ...
Setting up libmpfr4:amd64 (3.1.5-1) ...
Setting up libmpc3:amd64 (1.0.3-1+b2) ...
Setting up binutils (2.28-5) ...
Setting up cpp-6 (6.3.0-18+deb9u1) ...
Setting up libitm1:amd64 (6.3.0-18+deb9u1) ...
Setting up cpp (4:6.3.0-4) ...
Setting up libgcc-6-dev:amd64 (6.3.0-18+deb9u1) ...
Setting up libstdc++-6-dev:amd64 (6.3.0-18+deb9u1) ...
Setting up gcc-6 (6.3.0-18+deb9u1) ...
Setting up g++-6 (6.3.0-18+deb9u1) ...
Setting up gcc (4:6.3.0-4) ...
Setting up g++ (4:6.3.0-4) ...
update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode
Processing triggers for libc-bin (2.24-11+deb9u4) ...
Building native extensions. This could take a while...
Successfully installed msgpack-1.3.1
Building native extensions. This could take a while...
Successfully installed yajl-ruby-1.4.1
Building native extensions. This could take a while...
Successfully installed cool.io-1.5.4
Successfully installed sigdump-0.2.4
Successfully installed serverengine-2.2.0
Building native extensions. This could take a while...
Successfully installed http_parser.rb-0.6.0
Successfully installed concurrent-ruby-1.1.5
Successfully installed tzinfo-2.0.1
Successfully installed tzinfo-data-1.2019.3
Building native extensions. This could take a while...
Successfully installed strptime-0.2.3
Successfully installed dig_rb-1.0.1
Successfully installed fluentd-1.8.1
Successfully installed excon-0.71.1
Successfully installed multi_json-1.14.1
Successfully installed multipart-post-2.1.1
Successfully installed faraday-1.0.0
Successfully installed elasticsearch-transport-7.4.0
Successfully installed elasticsearch-api-7.4.0
Successfully installed elasticsearch-7.4.0
Successfully installed fluent-plugin-elasticsearch-3.8.0
20 gems installed
*** Removed specs cache ***
Reading package lists...
Building dependency tree...
Reading state information...
The following packages will be REMOVED:
binutils* cpp* cpp-6* g++* g++-6* gcc* gcc-6* libasan3* libatomic1*
libcc1-0* libcilkrts5* libgcc-6-dev* libgomp1* libisl15* libitm1* liblsan0*
libmpc3* libmpfr4* libmpx2* libquadmath0* libstdc++-6-dev* libtsan0*
libubsan0* make* sudo*
0 upgraded, 0 newly installed, 25 to remove and 1 not upgraded.
After this operation, 137 MB disk space will be freed.
(Reading database ... 9864 files and directories currently installed.)
Removing g++ (4:6.3.0-4) ...
Removing gcc (4:6.3.0-4) ...
Removing cpp (4:6.3.0-4) ...
Removing g++-6 (6.3.0-18+deb9u1) ...
Removing libstdc++-6-dev:amd64 (6.3.0-18+deb9u1) ...
Removing make (4.1-9.1) ...
Removing sudo (1.8.19p1-2.1+deb9u1) ...
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of stop.
Removing gcc-6 (6.3.0-18+deb9u1) ...
Removing binutils (2.28-5) ...
Removing cpp-6 (6.3.0-18+deb9u1) ...
Removing libgcc-6-dev:amd64 (6.3.0-18+deb9u1) ...
Removing libasan3:amd64 (6.3.0-18+deb9u1) ...
Removing libatomic1:amd64 (6.3.0-18+deb9u1) ...
Removing libcc1-0:amd64 (6.3.0-18+deb9u1) ...
Removing libcilkrts5:amd64 (6.3.0-18+deb9u1) ...
Removing libgomp1:amd64 (6.3.0-18+deb9u1) ...
Removing libisl15:amd64 (0.18-1) ...
Removing libitm1:amd64 (6.3.0-18+deb9u1) ...
Removing liblsan0:amd64 (6.3.0-18+deb9u1) ...
Removing libmpc3:amd64 (1.0.3-1+b2) ...
Removing libmpfr4:amd64 (3.1.5-1) ...
Removing libmpx2:amd64 (6.3.0-18+deb9u1) ...
Removing libquadmath0:amd64 (6.3.0-18+deb9u1) ...
Removing libtsan0:amd64 (6.3.0-18+deb9u1) ...
Removing libubsan0:amd64 (6.3.0-18+deb9u1) ...
Processing triggers for libc-bin (2.24-11+deb9u4) ...
(Reading database ... 8275 files and directories currently installed.)
Purging configuration files for sudo (1.8.19p1-2.1+deb9u1) ...
Removing intermediate container 74b1d0ad6a71
---> 7cf98d96ee95
#...