dockerfiles updates

master
Tudor Stanciu 2022-06-18 09:11:10 +03:00
parent 67cb1b092a
commit 7771d774cc
6 changed files with 15 additions and 4 deletions

View File

@ -5,7 +5,7 @@ version="1.0.5"
localRegistryPass="***REMOVED***" localRegistryPass="***REMOVED***"
echo "Create docker image with version $version." 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." echo "Tag docker image with registry prefix."
docker tag network-resurrector-api:$version alpine-nexus:8500/network-resurrector/network-resurrector-api:$version docker tag network-resurrector-api:$version alpine-nexus:8500/network-resurrector/network-resurrector-api:$version

View File

@ -9,7 +9,7 @@ echo "Login to dockerhub registry."
docker login --username=tstanciu --password=$dockerHubRegistryPass docker login --username=tstanciu --password=$dockerHubRegistryPass
echo "Create docker image with version $version and publish it to dockerhub registry." 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." echo "Pull docker image with version $version from dockerhub registry."
docker pull tstanciu/sta-registry:network-resurrector-api-$version-arm32v7 docker pull tstanciu/sta-registry:network-resurrector-api-$version-arm32v7

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework> <TargetFramework>net5.0</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework> <TargetFramework>net5.0</TargetFramework>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@ -29,6 +29,11 @@ ENV urls="http://*:80"
ENV ConnectionStrings__DatabaseConnection="***REMOVED***" ENV ConnectionStrings__DatabaseConnection="***REMOVED***"
ENV IdentityServer__BaseAddress="http://***REMOVED***/" ENV IdentityServer__BaseAddress="http://***REMOVED***/"
ENV NetworkResurrectorServer__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 #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 RUN sed -i 's/TLSv1.2/TLSv1.0/g' /etc/ssl/openssl.cnf

View File

@ -28,6 +28,12 @@ COPY --from=publish /app/publish .
ENV urls="http://*:80" ENV urls="http://*:80"
ENV ConnectionStrings__DatabaseConnection="***REMOVED***" ENV ConnectionStrings__DatabaseConnection="***REMOVED***"
ENV IdentityServer__BaseAddress="http://***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 #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 RUN sed -i 's/TLSv1.2/TLSv1.0/g' /etc/ssl/openssl.cnf