Description
need to build a Ubuntu based container . Errors out in docker build
` => [internal] load build definition from UbuDockerfile 0.0s
=> => transferring dockerfile: 609B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/ubuntu:latest 0.8s
=> [auth] library/ubuntu:pull token for registry-1.docker.io 0.0s
=> CACHED [1/6] FROM docker.io/library/ubuntu@sha256:6042500cf4b44023ea1894effe7890666b0c5c7871ed83a97c36c76ae560bb9b 0.0s
=> [2/6] RUN APT-GET update && apt-get install -y perl cpanminus nano libdbd-sqlite3-perl 35.6s
=> [3/6] RUN CPANM -n JSON::MaybeXS 3.2s
=> [4/6] RUN CPANM -n Jq 8.3s
=> [5/6] RUN CPANM -n Math::Complex Math::StdDev 3.3s
=> [6/6] RUN APT-GET clean 0.2s
=> exporting to image 3.6s
=> => exporting layers 3.5s
=> => writing image sha256:eecbf6ba2ea0458540cbd00097415754b90831b3fbd9fb0d2905112f12aeebc8 0.0s
=> => naming to docker.io/library/hacs 0.0s
pi@pi-vault:~/Docker/hacs $ grep run Dockerfile
docker run -v/home:/home --name hacs-develop -e HACS=/home/pi/.home-assistant --rm -it hacs bash
docker run -v/home:/home --restart unless-stopped --name hacs-tracker -e HACS=/home/pi/.home-assistant -d hacs
pi@pi-vault:/Docker/hacs $ docker run -v/home:/home --name hacs-develop -e HACS=/home/pi/.home-assistant --rm -it hacs
Can't locate JSON/JQ.pm in @inc (you may need to install the JSON::JQ module) (@inc contains: /etc/perl /usr/local/lib/aarch64-linux-gnu/perl/5.34.0 /usr/local/share/perl/5.34.0 /usr/lib/aarch64-linux-gnu/perl5/5.34 /usr/share/perl5 /usr/lib/aarch64-linux-gnu/perl-base /usr/lib/aarch64-linux-gnu/perl/5.34 /usr/share/perl/5.34 /usr/local/lib/site_perl) at /home/pi/hacs/hacs_rel.pl line 8.
pi@pi-vault:/Docker/hacs $ vi UbuDockerfile
pi@pi-vault:~/Docker/hacs $ docker build -t hacs --network=host -f UbuDockerfile .
[+] Building 31.8s (8/11) docker:default
=> [internal] load build definition from UbuDockerfile 0.0s
=> => transferring dockerfile: 612B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/ubuntu:latest 0.8s
=> [auth] library/ubuntu:pull token for registry-1.docker.io 0.0s
=> [1/7] FROM docker.io/library/ubuntu@sha256:6042500cf4b44023ea1894effe7890666b0c5c7871ed83a97c36c76ae560bb9b 0.0s
=> CACHED [2/7] RUN APT-GET update && apt-get install -y perl cpanminus nano libdbd-sqlite3-perl 0.0s
=> CACHED [3/7] RUN CPANM -n JSON::MaybeXS 0.0s
=> ERROR [4/7] RUN CPANM -n JSON::JQ 30.9s
Can't locate JSON/JQ.pm in @inc (you may need to install the JSON::JQ module) (@inc contains: /etc/perl /usr/local/lib/aarch64-linux-gnu/perl/5.34.0 /usr/local/share/perl/5.34.0 /usr/lib/aarch64-linux-gnu/perl5/5.34 /usr/share/perl5 /usr/lib/aarch64-linux-gnu/perl-base /usr/lib/aarch64-linux-gnu/perl/5.34 /usr/share/perl/5.34 /usr/local/lib/site_perl) at /home/pi/hacs/hacs_rel.pl line 8.
pi@pi-vault:
[4/7] RUN CPANM -n JSON::JQ:
0.877 --> Working on JSON::JQ
0.877 Fetching http://www.cpan.org/authors/id/D/DO/DONGXU/JSON-JQ-0.09.tar.gz ... OK
1.530 ==> Found dependencies: Alien::Base::Wrapper, Alien::LibJQ
1.530 --> Working on Alien::Base::Wrapper
1.530 Fetching http://www.cpan.org/authors/id/P/PL/PLICEASE/Alien-Build-2.80.tar.gz ... OK
1.862 ==> Found dependencies: File::Which
1.862 --> Working on File::Which
1.862 Fetching http://www.cpan.org/authors/id/P/PL/PLICEASE/File-Which-1.27.tar.gz ... OK
1.929 Configuring File-Which-1.27 ... OK
2.540 Building File-Which-1.27 ... OK
3.806 Successfully installed File-Which-1.27
3.943 Configuring Alien-Build-2.80 ... OK
5.355 ==> Found dependencies: PkgConfig, File::chdir, Capture::Tiny, FFI::CheckLib
5.355 --> Working on PkgConfig
5.355 Fetching http://www.cpan.org/authors/id/P/PL/PLICEASE/PkgConfig-0.25026.tar.gz ... OK
5.605 Configuring PkgConfig-0.25026 ... OK
6.456 Building PkgConfig-0.25026 ... OK
9.354 Successfully installed PkgConfig-0.25026
9.586 --> Working on File::chdir
9.586 Fetching http://www.cpan.org/authors/id/D/DA/DAGOLDEN/File-chdir-0.1011.tar.gz ... OK
9.662 Configuring File-chdir-0.1011 ... OK
10.56 Building File-chdir-0.1011 ... OK
11.87 Successfully installed File-chdir-0.1011
12.06 --> Working on Capture::Tiny
12.06 Fetching http://www.cpan.org/authors/id/D/DA/DAGOLDEN/Capture-Tiny-0.48.tar.gz ... OK
12.13 Configuring Capture-Tiny-0.48 ... OK
12.75 Building Capture-Tiny-0.48 ... OK
14.03 Successfully installed Capture-Tiny-0.48
14.22 --> Working on FFI::CheckLib
14.22 Fetching http://www.cpan.org/authors/id/P/PL/PLICEASE/FFI-CheckLib-0.31.tar.gz ... OK
14.32 Configuring FFI-CheckLib-0.31 ... OK
14.96 Building FFI-CheckLib-0.31 ... OK
16.26 Successfully installed FFI-CheckLib-0.31
16.45 Building Alien-Build-2.80 ... OK
22.16 Successfully installed Alien-Build-2.80
22.48 --> Working on Alien::LibJQ
22.48 Fetching http://www.cpan.org/authors/id/D/DO/DONGXU/Alien-LibJQ-0.06.tar.gz ... OK
22.57 Configuring Alien-LibJQ-0.06 ... OK
23.85 ==> Found dependencies: IO::Socket::SSL, Sort::Versions, Alien::cmake3, Net::SSLeay, Mozilla::CA
23.85 --> Working on IO::Socket::SSL
23.85 Fetching http://www.cpan.org/authors/id/S/SU/SULLR/IO-Socket-SSL-2.084.tar.gz ... OK
24.26 ==> Found dependencies: Net::SSLeay
24.26 --> Working on Net::SSLeay
24.26 Fetching http://www.cpan.org/authors/id/C/CH/CHRISN/Net-SSLeay-1.92.tar.gz ... OK
24.42 Configuring Net-SSLeay-1.92 ... ! Configure failed for Net-SSLeay-1.92. See /root/.cpanm/work/1703241651.7/build.log for details.
25.00 ! Installing the dependencies failed: Module 'Net::SSLeay' is not installed
25.00 ! Bailing out the installation for IO-Socket-SSL-2.084.
25.08 N/A
25.08 --> Working on Sort::Versions
25.08 Fetching http://www.cpan.org/authors/id/N/NE/NEILB/Sort-Versions-1.62.tar.gz ... OK
25.14 Configuring Sort-Versions-1.62 ... OK
25.68 Building Sort-Versions-1.62 ... OK
26.98 Successfully installed Sort-Versions-1.62
27.30 --> Working on Alien::cmake3
27.30 Fetching http://www.cpan.org/authors/id/P/PL/PLICEASE/Alien-cmake3-0.08.tar.gz ... OK
27.42 Configuring Alien-cmake3-0.08 ... OK
28.65 ==> Found dependencies: IO::Socket::SSL, Mozilla::CA, Net::SSLeay
28.65 --> Working on Mozilla::CA
28.65 Fetching http://www.cpan.org/authors/id/L/LW/LWP/Mozilla-CA-20231213.tar.gz ... OK
28.72 Configuring Mozilla-CA-20231213 ... OK
29.24 Building Mozilla-CA-20231213 ... OK
30.43 Successfully installed Mozilla-CA-20231213
30.60 ! Installing the dependencies failed: Module 'IO::Socket::SSL' is not installed, Module 'Net::SSLeay' is not installed
30.60 ! Bailing out the installation for Alien-cmake3-0.08.
30.66 ! Installing the dependencies failed: Module 'IO::Socket::SSL' is not installed, Module 'Alien::cmake3' is not installed, Module 'Net::SSLeay' is not installed
30.66 ! Bailing out the installation for Alien-LibJQ-0.06.
30.67 ! Installing the dependencies failed: Module 'Alien::LibJQ' is not installed
30.67 ! Bailing out the installation for JSON-JQ-0.09.
30.67 8 distributions installed
UbuDockerfile:7
5 | #RUN cpanm -n Time::ParseDate
6 | RUN cpanm -n JSON::MaybeXS
7 | >>> RUN cpanm -n JSON::JQ
8 | RUN cpanm -n DBI DBD::SQLite
9 | RUN cpanm -n Math::Complex Math::StdDev
ERROR: failed to solve: process "/bin/sh -c cpanm -n JSON::JQ" did not complete successfully: exit code: 1`
Here is text of dockerfile
`FROM ubuntu
#docker build -t hacs --network=host .
RUN apt-get update && apt-get install -y perl cpanminus nano libdbd-sqlite3-perl
#RUN cpanm -n Time::ParseDate
RUN cpanm -n JSON::MaybeXS
RUN cpanm -n JSON::JQ
RUN cpanm -n DBI DBD::SQLite
RUN cpanm -n Math::Complex Math::StdDev
ENV HACS_DIR=${HACS_DIR:-/home/pi/hacs}
ENV HACS=${HACS:-/config}
ENV PATH=$PATH:/usr/bin
RUN apt-get clean
CMD ["perl" , "/home/pi/hacs/hacs_rel.pl" ]`
Any suggestions to progress would be much appreciated and thanks for creating JQ -- successfully used in other projects