diff --git a/build-amd64.sh b/build-amd64.sh index 0807834..e8c35de 100644 --- a/build-amd64.sh +++ b/build-amd64.sh @@ -5,7 +5,7 @@ version="1.0.5" localRegistryPass="***REMOVED***" echo "Create docker image with version $version." -docker image build -t "network-resurrector-api:$version" -f "src/api/NetworkResurrector.Api/Docker/amd64/Dockerfile" . +docker image build --build-arg APP_VERSION=$version -t "network-resurrector-api:$version" -f "src/api/NetworkResurrector.Api/Docker/amd64/Dockerfile" . echo "Tag docker image with registry prefix." docker tag network-resurrector-api:$version alpine-nexus:8500/network-resurrector/network-resurrector-api:$version diff --git a/build-arm32v7.sh b/build-arm32v7.sh index 6de20b0..2b70f39 100644 --- a/build-arm32v7.sh +++ b/build-arm32v7.sh @@ -9,7 +9,7 @@ echo "Login to dockerhub registry." docker login --username=tstanciu --password=$dockerHubRegistryPass echo "Create docker image with version $version and publish it to dockerhub registry." -docker buildx build --platform linux/arm/v7 -t "tstanciu/sta-registry:network-resurrector-api-$version-arm32v7" -f "src/api/NetworkResurrector.Api/Docker/arm32v7/Dockerfile" --push . +docker buildx build --build-arg APP_VERSION=$version --platform linux/arm/v7 -t "tstanciu/sta-registry:network-resurrector-api-$version-arm32v7" -f "src/api/NetworkResurrector.Api/Docker/arm32v7/Dockerfile" --push . echo "Pull docker image with version $version from dockerhub registry." docker pull tstanciu/sta-registry:network-resurrector-api-$version-arm32v7 diff --git a/src/api/NetworkResurrector.Api.Domain.Data/NetworkResurrector.Api.Domain.Data.csproj b/src/api/NetworkResurrector.Api.Domain.Data/NetworkResurrector.Api.Domain.Data.csproj index 66143a6..4b24608 100644 --- a/src/api/NetworkResurrector.Api.Domain.Data/NetworkResurrector.Api.Domain.Data.csproj +++ b/src/api/NetworkResurrector.Api.Domain.Data/NetworkResurrector.Api.Domain.Data.csproj @@ -1,7 +1,7 @@ - netstandard2.1 + net5.0 diff --git a/src/api/NetworkResurrector.Api.Domain/NetworkResurrector.Api.Domain.csproj b/src/api/NetworkResurrector.Api.Domain/NetworkResurrector.Api.Domain.csproj index d4c395e..f208d30 100644 --- a/src/api/NetworkResurrector.Api.Domain/NetworkResurrector.Api.Domain.csproj +++ b/src/api/NetworkResurrector.Api.Domain/NetworkResurrector.Api.Domain.csproj @@ -1,7 +1,7 @@ - netstandard2.1 + net5.0 diff --git a/src/api/NetworkResurrector.Api/Docker/amd64/Dockerfile b/src/api/NetworkResurrector.Api/Docker/amd64/Dockerfile index 53204e4..39d3b4a 100644 --- a/src/api/NetworkResurrector.Api/Docker/amd64/Dockerfile +++ b/src/api/NetworkResurrector.Api/Docker/amd64/Dockerfile @@ -29,6 +29,11 @@ ENV urls="http://*:80" ENV ConnectionStrings__DatabaseConnection="***REMOVED***" ENV IdentityServer__BaseAddress="http://***REMOVED***/" ENV NetworkResurrectorServer__BaseAddress="http://***REMOVED***/" +ENV TZ=Europe/Bucharest +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +ARG APP_VERSION=0.0.0.0 +ENV APP_VERSION=${APP_VERSION} #Workaround to lower the TLS level in container for old sql server version RUN sed -i 's/TLSv1.2/TLSv1.0/g' /etc/ssl/openssl.cnf diff --git a/src/api/NetworkResurrector.Api/Docker/arm32v7/Dockerfile b/src/api/NetworkResurrector.Api/Docker/arm32v7/Dockerfile index 187e711..241e4b9 100644 --- a/src/api/NetworkResurrector.Api/Docker/arm32v7/Dockerfile +++ b/src/api/NetworkResurrector.Api/Docker/arm32v7/Dockerfile @@ -28,6 +28,12 @@ COPY --from=publish /app/publish . ENV urls="http://*:80" ENV ConnectionStrings__DatabaseConnection="***REMOVED***" ENV IdentityServer__BaseAddress="http://***REMOVED***/" +ENV NetworkResurrectorServer__BaseAddress="http://***REMOVED***/" +ENV TZ=Europe/Bucharest +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +ARG APP_VERSION=0.0.0.0 +ENV APP_VERSION=${APP_VERSION} #Workaround to lower the TLS level in container for old sql server version RUN sed -i 's/TLSv1.2/TLSv1.0/g' /etc/ssl/openssl.cnf