Generate bitbetter/identiry container with modified Core.dll

Added the generation of a second modified container, bitbetter/identity, which contains the modified dll. Fixes #12.

This works on my testing environment but has not gone through extensive testing. I'd recommend a review and cleanup of this commit before it is merged into the develop or master branches.
This commit is contained in:
Jeff Alyanak 2019-05-13 21:13:20 -04:00
parent 05543b5b8a
commit 4d4b173344
No known key found for this signature in database
GPG Key ID: DD0CB89C105B276F
5 changed files with 21 additions and 3 deletions

View File

@ -9,12 +9,12 @@ Credit to https://github.com/h44z/BitBetter and https://github.com/jakeswenson/B
## Building
To build your own `bitwarden/api` image run
To build your own `bitwarden/api` & `bitwarden/identity` images run
```bash
./build.sh
```
replace anywhere `bitwarden/api` is used with `bitbetter/api` and give it a go. no promises
In your `bwdata/docker/docker-compose.yml` replace each reference to `bitwarden/api:x.xx.x` with `bitbetter/api` and each reference to `bitwarden/identity:x.xx.x` with `bitbetter/identity` and the start bitwarden as normal.
## Issuing your own licenses

View File

@ -79,7 +79,7 @@ cd src/licenseGen/
cd ~
vi ~/bwdata/docker/docker-compose.yml - Change image: bitwarden/api:1.26.0 to image: bitbetter/api
vi ~/bwdata/docker/docker-compose.yml - Change image: bitwarden/api:1.26.0 to image: bitbetter/api and image: bitwarden/identity:x.xx.x to image: bitbetter/identity
vi ~/bwdata/env/global.override.env - Enter mail__smtp relay settings
vi ~/bwdata/scripts/run.sh - function restart() { dockerComposePull to #dockerComposePull

View File

@ -9,5 +9,11 @@ cd ./src/bitBetter
dotnet restore
dotnet publish
cp -r bin/ api/
cp -r bin/ identity/
cd ./api
docker build --pull . -t bitbetter/api # --squash
cd ../identity
docker build --pull . -t bitbetter/identity # --squash

View File

@ -0,0 +1,12 @@
FROM bitwarden/identity
COPY bin/Debug/netcoreapp2.0/publish/* /bitBetter/
COPY ./.keys/cert.cert /newLicensing.cer
RUN dotnet /bitBetter/bitBetter.dll && \
echo "modified 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"