Replace echo in Dockerfiles by set -x and set -e

This commit is contained in:
Vinrobot 2019-07-05 21:16:58 +02:00
parent 08639f1e32
commit 7691022f31
No known key found for this signature in database
GPG Key ID: 20207D962D63DD48
3 changed files with 8 additions and 11 deletions

View File

@ -3,10 +3,8 @@ FROM bitwarden/api
COPY bin/Debug/netcoreapp2.0/publish/* /bitBetter/
COPY ./.keys/cert.cert /newLicensing.cer
RUN dotnet /bitBetter/bitBetter.dll && \
echo "modified dll" && \
RUN set -e; set -x; \
dotnet /bitBetter/bitBetter.dll && \
mv /app/Core.dll /app/Core.orig.dll && \
mv /app/modified.dll /app/Core.dll && \
echo "replaced dll" && \
rm -rf /bitBetter && rm -rf /newLicensing.cer && \
echo "cleaned up"
rm -rf /bitBetter && rm -rf /newLicensing.cer

View File

@ -3,10 +3,8 @@ FROM bitwarden/identity
COPY bin/Debug/netcoreapp2.0/publish/* /bitBetter/
COPY ./.keys/cert.cert /newLicensing.cer
RUN dotnet /bitBetter/bitBetter.dll && \
echo "modified dll" && \
RUN set -e; set -x; \
dotnet /bitBetter/bitBetter.dll && \
mv /app/Core.dll /app/Core.orig.dll && \
mv /app/modified.dll /app/Core.dll && \
echo "replaced dll" && \
rm -rf /bitBetter && rm -rf /newLicensing.cer && \
echo "cleaned up"
rm -rf /bitBetter && rm -rf /newLicensing.cer

View File

@ -4,7 +4,8 @@ WORKDIR /licenseGen
COPY . /licenseGen
RUN dotnet add package Newtonsoft.Json --version 12.0.1 \
RUN set -e; set -x; \
dotnet add package Newtonsoft.Json --version 12.0.1 \
&& dotnet restore \
&& dotnet publish