mirror of
				https://github.com/jakeswenson/BitBetter.git
				synced 2025-10-31 12:53:25 +00:00 
			
		
		
		
	Use same Dockerfile for api and identity images
This commit is contained in:
		
							parent
							
								
									7691022f31
								
							
						
					
					
						commit
						783bde09f1
					
				
							
								
								
									
										13
									
								
								build.sh
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								build.sh
									
									
									
									
									
								
							|  | @ -5,16 +5,13 @@ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||||||
| # If there aren't any keys, generate them first. | # If there aren't any keys, generate them first. | ||||||
| [ -e "$DIR/.keys/cert.cert" ] || "$DIR/.keys/generate-keys.sh" | [ -e "$DIR/.keys/cert.cert" ] || "$DIR/.keys/generate-keys.sh" | ||||||
| 
 | 
 | ||||||
| [ -e "$DIR/src/bitBetter/api/.keys" ]  || mkdir "$DIR/src/bitBetter/api/.keys" | [ -e "$DIR/src/bitBetter/.keys" ] || mkdir "$DIR/src/bitBetter/.keys" | ||||||
| [ -e "$DIR/src/bitBetter/identity/.keys" ]  || mkdir "$DIR/src/bitBetter/identity/.keys" |  | ||||||
| 
 | 
 | ||||||
| cp "$DIR/.keys/cert.cert" "$DIR/src/bitBetter/api/.keys" | cp "$DIR/.keys/cert.cert" "$DIR/src/bitBetter/.keys" | ||||||
| cp "$DIR/.keys/cert.cert" "$DIR/src/bitBetter/identity/.keys" |  | ||||||
| 
 | 
 | ||||||
| docker run -v "$DIR/src/bitBetter:/bitBetter" -w=/bitBetter mcr.microsoft.com/dotnet/core/sdk:2.1 sh build.sh | docker run -v "$DIR/src/bitBetter:/bitBetter" -w=/bitBetter mcr.microsoft.com/dotnet/core/sdk:2.1 sh build.sh | ||||||
| 
 | 
 | ||||||
| cp -r "$DIR/src/bitBetter/bin" "$DIR/src/bitBetter/api/" | docker build --build-arg BITWARDEN_TAG=bitwarden/api -t bitbetter/api "$DIR/src/bitBetter" # --squash | ||||||
| cp -r "$DIR/src/bitBetter/bin" "$DIR/src/bitBetter/identity/" | docker build --build-arg BITWARDEN_TAG=bitwarden/identity -t bitbetter/identity "$DIR/src/bitBetter" # --squash | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
| docker build -t bitbetter/api "$DIR/src/bitBetter/api" # --squash |  | ||||||
| docker build -t bitbetter/identity "$DIR/src/bitBetter/identity" # --squash |  | ||||||
|  |  | ||||||
|  | @ -1,4 +1,5 @@ | ||||||
| FROM bitwarden/api | ARG BITWARDEN_TAG | ||||||
|  | FROM ${BITWARDEN_TAG} | ||||||
| 
 | 
 | ||||||
| COPY bin/Debug/netcoreapp2.0/publish/* /bitBetter/ | COPY bin/Debug/netcoreapp2.0/publish/* /bitBetter/ | ||||||
| COPY ./.keys/cert.cert /newLicensing.cer | COPY ./.keys/cert.cert /newLicensing.cer | ||||||
|  | @ -1,10 +0,0 @@ | ||||||
| FROM bitwarden/identity |  | ||||||
| 
 |  | ||||||
| COPY bin/Debug/netcoreapp2.0/publish/* /bitBetter/ |  | ||||||
| COPY ./.keys/cert.cert /newLicensing.cer |  | ||||||
| 
 |  | ||||||
| RUN set -e; set -x; \ |  | ||||||
|     dotnet /bitBetter/bitBetter.dll && \ |  | ||||||
|     mv /app/Core.dll /app/Core.orig.dll && \ |  | ||||||
|     mv /app/modified.dll /app/Core.dll && \ |  | ||||||
|     rm -rf /bitBetter && rm -rf /newLicensing.cer |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user