Added smartmontools for checking SMART values with agent2

This commit is contained in:
Alexey Pustovalov 2021-11-13 21:11:07 +01:00
commit acc268471f
8 changed files with 30 additions and 14 deletions

View File

@ -140,7 +140,7 @@ jobs:
echo "docker build --file=$dockerfile $tags $context"
docker build --label org.opencontainers.image.revision=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }} `
--label org.opencontainers.image.created=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }} `
--build-arg=BUILD_BASE_IMAGE=mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-${{ steps.base_os_tag.outputs.os_tag }} `
--build-arg=BUILD_BASE_IMAGE=mcr.microsoft.com/windows/servercore:${{ steps.base_os_tag.outputs.os_tag }} `
--file=$dockerfile `
$tags `
$context

View File

@ -38,6 +38,8 @@ RUN set -eux && \
pcre \
coreutils \
libcurl \
smartmontools \
sudo \
iputils" && \
apk add \
--no-cache \

View File

@ -39,6 +39,8 @@ RUN set -eux && \
iputils \
pcre \
libcurl-minimal \
smartmontools \
sudo \
openssl-libs" && \
dnf -y install epel-release && \
dnf -y install \

View File

@ -39,6 +39,8 @@ RUN set -eux && \
iputils \
pcre \
libcurl \
smartmontools \
sudo \
openssl-libs" && \
microdnf -y install \
--disablerepo="*" \

View File

@ -57,6 +57,8 @@ RUN set -eux && \
iputils \
shadow-utils \
pcre \
smartmontools \
sudo \
libcurl" && \
curl -sSL -o /tmp/epel-release-latest-8.noarch.rpm https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm && \
rpm -ivh /tmp/epel-release-latest-8.noarch.rpm && \

View File

@ -36,6 +36,8 @@ RUN set -eux && \
INSTALL_PKGS="tini \
tzdata \
ca-certificates \
smartmontools \
sudo \
libssl1.1 \
libcurl4 \
libldap-2.4" && \

View File

@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1
# escape=`
ARG BUILD_BASE_IMAGE=mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2022
ARG BUILD_BASE_IMAGE=mcr.microsoft.com/windows/servercore:ltsc2022
FROM $BUILD_BASE_IMAGE
ARG PCRE_VERSION=8.45
@ -15,7 +15,7 @@ ARG VS_BUILDTOOLS_URL=https://aka.ms/vs/16/release/vs_buildtools.exe
ARG NASM_URL=https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/win64/nasm-2.15.05-installer-x64.exe
ARG PERL_URL=https://strawberryperl.com/download/5.32.1.1/strawberry-perl-5.32.1.1-64bit.msi
ARG GIT_URL=https://github.com/git-for-windows/git/releases/download/v2.33.0.windows.2/MinGit-2.33.0.2-busybox-64-bit.zip
ARG PCRE_URL=https://ftp.pcre.org/pub/pcre/pcre-$PCRE_VERSION.zip
ARG PCRE_URL=https://sourceforge.net/projects/pcre/files/pcre/$PCRE_VERSION/pcre-$PCRE_VERSION.zip
ARG OPENSSL_URL=https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz
ENV ZBX_VERSION=$ZBX_VERSION `
@ -106,7 +106,7 @@ RUN Set-Location -Path $env:SystemDrive\.; `
`
Write-Host 'Installing Text::Template...'; `
cpan Text::Template; `
`
`
Write-Host ('Downloading {0} ...' -f $env:VS_BUILDTOOLS_URL); `
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `
Invoke-WebRequest -OutFile $env:SystemDrive\vs_buildtools.exe $env:VS_BUILDTOOLS_URL; `
@ -116,8 +116,11 @@ RUN Set-Location -Path $env:SystemDrive\.; `
--quiet `
--wait `
--norestart `
--nocache modify `
--nocache `
--installPath """${env:ProgramFiles(x86)}\Microsoft Visual Studio\2019\BuildTools""" `
--channelUri https://aka.ms/vs/16/release/channel `
--installChannelUri https://aka.ms/vs/16/release/channel `
--channelId VisualStudio.16.Release `
# https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-build-tools?view=vs-2019
--add Microsoft.VisualStudio.Component.Windows10SDK.19041 `
--add Microsoft.VisualStudio.Component.VC.CMake.Project; `
@ -130,7 +133,7 @@ RUN Set-Location -Path $env:SystemDrive\.; `
Write-Host 'Visual Studio components installation cleanup'; `
Write-Host 'Removing downloaded...'; `
Remove-Item -Force -Path $env:SystemDrive\vs_buildtools.exe; `
Get-ChildItem -Path """${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer""" -Directory -Recurse | Remove-Item -Force Recurse; `
Get-ChildItem -Path """${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer""" -Directory -Recurse | Remove-Item -Force -Recurse; `
Remove-Item -Force -Recurse $env:TEMP\*; `
Write-Host 'Build environment is ready...';
@ -141,7 +144,7 @@ RUN Set-Location -Path $env:SystemDrive\.; `
`
Write-Host ('Downloading {0} ...' -f $env:PCRE_URL); `
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `
Invoke-WebRequest -OutFile $env:SystemDrive\pcre.zip -Uri $env:PCRE_URL; `
(new-object System.Net.WebClient).DownloadFile("""$env:PCRE_URL""","""$env:SystemDrive\pcre.zip"""); `
`
$sha256 = '5b709aa45ea3b8bb73052947200ad187f651a2049158fb5bbfed329e4322a977'; `
Write-Host ('Verifying SHA256 ({0}) ...' -f $sha256); `

View File

@ -1,12 +1,12 @@
# syntax=docker/dockerfile:1
# escape=`
ARG BUILD_BASE_IMAGE=mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2022
ARG BUILD_BASE_IMAGE=mcr.microsoft.com/windows/servercore:ltsc2022
FROM $BUILD_BASE_IMAGE as builder_base
ARG PCRE_VERSION=8.45
ARG OPENSSL_VERSION=1.1.1l
ARG ZLIB_VERSION=1.2.11
ARG GOLANG_VERSION=1.17.2
ARG GOLANG_VERSION=1.17.3
ARG SEVEN_ZIP_VERSION=1900
ARG BUILD_ARCH=x64
ARG CPU_MODEL=AMD64
@ -19,7 +19,7 @@ ARG GIT_URL=https://github.com/git-for-windows/git/releases/download/v2.33.0.win
ARG MINGW_URL=https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/8.1.0/threads-win32/sjlj/x86_64-8.1.0-release-win32-sjlj-rt_v6-rev0.7z
ARG GOLANG_URL=https://golang.org/dl/go$GOLANG_VERSION.windows-amd64.msi
ARG CYGWIN_URL=https://cygwin.com/setup-x86_64.exe
ARG PCRE_URL=https://ftp.pcre.org/pub/pcre/pcre-$PCRE_VERSION.zip
ARG PCRE_URL=https://sourceforge.net/projects/pcre/files/pcre/$PCRE_VERSION/pcre-$PCRE_VERSION.zip
ARG OPENSSL_URL=https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz
ARG SEVEN_ZIP_URL=https://www.7-zip.org/a/7z$SEVEN_ZIP_VERSION-$BUILD_ARCH.msi
@ -67,7 +67,7 @@ RUN Set-Location -Path $env:SystemDrive\.; `
Write-Host ('Downloading {0} ...' -f $env:GOLANG_URL); `
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `
Invoke-WebRequest -OutFile $env:SystemDrive\go-amd64.msi -Uri $env:GOLANG_URL; `
$sha256 = 'f7d54883e9bb653b1a50061a7fa42a6503c680a25cee32f16ccba51a77b0c83b'; `
$sha256 = 'bf3c475726c9165eb5d809e1bb4ce33550a25850495aac0a5df6d0df05930936'; `
`
Write-Host ('Verifying SHA256 ({0}) ...' -f $sha256); `
if ((Get-FileHash $env:SystemDrive\go-amd64.msi -Algorithm sha256).Hash -ne $sha256) { `
@ -141,8 +141,11 @@ RUN Set-Location -Path $env:SystemDrive\.; `
--quiet `
--wait `
--norestart `
--nocache modify `
--nocache `
--installPath """${env:ProgramFiles(x86)}\Microsoft Visual Studio\2019\BuildTools""" `
--channelUri https://aka.ms/vs/16/release/channel `
--installChannelUri https://aka.ms/vs/16/release/channel `
--channelId VisualStudio.16.Release `
# https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-build-tools?view=vs-2019
--add Microsoft.VisualStudio.Component.Windows10SDK.19041 `
--add Microsoft.VisualStudio.Component.VC.CMake.Project; `
@ -155,7 +158,7 @@ RUN Set-Location -Path $env:SystemDrive\.; `
Write-Host 'Visual Studio components installation cleanup'; `
Write-Host 'Removing downloaded...'; `
Remove-Item -Force -Path $env:SystemDrive\vs_buildtools.exe; `
Get-ChildItem -Path """${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer""" -Directory -Recurse | Remove-Item -Force Recurse; `
Get-ChildItem -Path """${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer""" -Directory -Recurse | Remove-Item -Force -Recurse; `
Remove-Item -Force -Recurse $env:TEMP\*; `
Write-Host 'Build environment is ready...';
@ -166,7 +169,7 @@ RUN Set-Location -Path $env:SystemDrive\.; `
`
Write-Host ('Downloading {0} ...' -f $env:PCRE_URL); `
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `
Invoke-WebRequest -OutFile $env:SystemDrive\pcre.zip -Uri $env:PCRE_URL; `
(new-object System.Net.WebClient).DownloadFile("""$env:PCRE_URL""","""$env:SystemDrive\pcre.zip"""); `
`
Write-Host ('Verifying SHA256 ({0}) ...' -f $sha256); `
$sha256 = '5b709aa45ea3b8bb73052947200ad187f651a2049158fb5bbfed329e4322a977'; `