Skip to content

Commit

Permalink
build[dockerfile]: Fix cpan timeout during build (#196)
Browse files Browse the repository at this point in the history
Device::SerialPort took to long and caused timeout
  • Loading branch information
sidey79 committed Apr 14, 2024
2 parents addc272 + 2735a63 commit 1fbb91a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
9 changes: 5 additions & 4 deletions Dockerfile-bullseye
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ RUN <<EOF
LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get install -qqy --no-install-recommends \
ca-certificates \
gnupg \
locales
locales \
libusb-dev
LC_ALL=C c_rehash
LC_ALL=C DEBIAN_FRONTEND=noninteractive dpkg-reconfigure locales
echo 'de_DE@euro ISO-8859-15\nde_DE ISO-8859-1\nde_DE.UTF-8 UTF-8\nen_DK ISO-8859-1\nen_DK.ISO-8859-15 ISO-8859-15\nen_DK.UTF-8 UTF-8\nen_GB ISO-8859-1\nen_GB.ISO-8859-15 ISO-8859-15\nen_GB.UTF-8 UTF-8\nen_IE ISO-8859-1\nen_IE.ISO-8859-15 ISO-8859-15\nen_IE.UTF-8 UTF-8\nen_US ISO-8859-1\nen_US.ISO-8859-15 ISO-8859-15\nen_US.UTF-8 UTF-8\nes_ES@euro ISO-8859-15\nes_ES ISO-8859-1\nes_ES.UTF-8 UTF-8\nfr_FR@euro ISO-8859-15\nfr_FR ISO-8859-1\nfr_FR.UTF-8 UTF-8\nit_IT@euro ISO-8859-15\nit_IT ISO-8859-1\nit_IT.UTF-8 UTF-8\nnl_NL@euro ISO-8859-15\nnl_NL ISO-8859-1\nnl_NL.UTF-8 UTF-8\npl_PL ISO-8859-2\npl_PL.UTF-8 UTF-8' >/etc/locale.gen
Expand All @@ -50,8 +51,8 @@ RUN <<EOF
if [ "${TARGETPLATFORM}" != "linux/amd64" ] && [ "${TARGETPLATFORM}" != "linux/i386" ]; then
sed -i '/Device::Firmata::Constants/d' /usr/src/app/core-cpanfile
fi
cpm install --without-test --cpanfile /usr/src/app/core-cpanfile --show-build-log-on-failure --global --configure-timeout=180
cpm install --without-test --with-suggests --with-recommends --cpanfile /usr/src/app/core-cpanfile --show-build-log-on-failure --global --configure-timeout=180
cpm install --without-test --cpanfile /usr/src/app/core-cpanfile --show-build-log-on-failure --global --configure-timeout=360 --workers=2
cpm install --without-test --with-suggests --with-recommends --cpanfile /usr/src/app/core-cpanfile --show-build-log-on-failure --global --configure-timeout=360 --workers=2

rm -rf /root/.cpanm
rm -rf /root/.perl-cpm
Expand Down Expand Up @@ -237,7 +238,7 @@ RUN <<EOF
sed -i '/Device::Firmata::Constants/d' /usr/src/app/3rdparty-cpanfile
fi

cpm install --cpanfile /usr/src/app/3rdparty-cpanfile --without-test --with-recommends --with-suggests --show-build-log-on-failure --global --configure-timeout=180
cpm install --cpanfile /usr/src/app/3rdparty-cpanfile --without-test --with-recommends --with-suggests --show-build-log-on-failure --global --configure-timeout=360 --workers=2
rm -rf /root/.cpanm
rm -rf /root/.perl-cpm
EOF
Expand Down
9 changes: 5 additions & 4 deletions Dockerfile-threaded-bullseye
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ RUN <<EOF
LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get install -qqy --no-install-recommends \
ca-certificates \
gnupg \
locales
locales \
libusb-dev
LC_ALL=C c_rehash
LC_ALL=C DEBIAN_FRONTEND=noninteractive dpkg-reconfigure locales
echo 'de_DE@euro ISO-8859-15\nde_DE ISO-8859-1\nde_DE.UTF-8 UTF-8\nen_DK ISO-8859-1\nen_DK.ISO-8859-15 ISO-8859-15\nen_DK.UTF-8 UTF-8\nen_GB ISO-8859-1\nen_GB.ISO-8859-15 ISO-8859-15\nen_GB.UTF-8 UTF-8\nen_IE ISO-8859-1\nen_IE.ISO-8859-15 ISO-8859-15\nen_IE.UTF-8 UTF-8\nen_US ISO-8859-1\nen_US.ISO-8859-15 ISO-8859-15\nen_US.UTF-8 UTF-8\nes_ES@euro ISO-8859-15\nes_ES ISO-8859-1\nes_ES.UTF-8 UTF-8\nfr_FR@euro ISO-8859-15\nfr_FR ISO-8859-1\nfr_FR.UTF-8 UTF-8\nit_IT@euro ISO-8859-15\nit_IT ISO-8859-1\nit_IT.UTF-8 UTF-8\nnl_NL@euro ISO-8859-15\nnl_NL ISO-8859-1\nnl_NL.UTF-8 UTF-8\npl_PL ISO-8859-2\npl_PL.UTF-8 UTF-8' >/etc/locale.gen
Expand All @@ -51,8 +52,8 @@ RUN <<EOF
if [ "${TARGETPLATFORM}" != "linux/amd64" ] && [ "${TARGETPLATFORM}" != "linux/i386" ]; then
sed -i '/Device::Firmata::Constants/d' /usr/src/app/core-cpanfile
fi
cpm install --without-test --cpanfile /usr/src/app/core-cpanfile --show-build-log-on-failure --global --configure-timeout=180
cpm install --without-test --with-suggests --with-recommends --cpanfile /usr/src/app/core-cpanfile --show-build-log-on-failure --global --configure-timeout=180
cpm install --without-test --cpanfile /usr/src/app/core-cpanfile --show-build-log-on-failure --global --configure-timeout=360 --workers=2
cpm install --without-test --with-suggests --with-recommends --cpanfile /usr/src/app/core-cpanfile --show-build-log-on-failure --global --configure-timeout=360 --workers=2

rm -rf /root/.cpanm
rm -rf /root/.perl-cpm/
Expand Down Expand Up @@ -209,7 +210,7 @@ RUN <<EOF
sed -i '/Device::Firmata::Constants/d' /usr/src/app/3rdparty-cpanfile
fi

cpm install --cpanfile /usr/src/app/3rdparty-cpanfile --without-test --with-recommends --with-suggests --show-build-log-on-failure --global --configure-timeout=180
cpm install --cpanfile /usr/src/app/3rdparty-cpanfile --without-test --with-recommends --with-suggests --show-build-log-on-failure --global --configure-timeout=360 --workers=2
rm -rf /root/.cpanm
rm -rf /root/.perl-cpm
EOF
Expand Down

0 comments on commit 1fbb91a

Please sign in to comment.