diff --git a/.dockerignore b/.dockerignore index 6dad5a569..72642e180 100644 --- a/.dockerignore +++ b/.dockerignore @@ -4,17 +4,20 @@ *.vs *.log +.vs +.git + # Build results -build -bin -obj -publish +**/build/ +**/bin/ +**/obj/ +**/publish/ # Test Output -_test-output +**/_test-output/ # NodeJS -node_modules +**/node_modules/ # Scripts (should be copied from node_modules on build) **/wwwroot/scripts/**/*.* \ No newline at end of file diff --git a/.gitignore b/.gitignore index 6dad5a569..549a8b85d 100644 --- a/.gitignore +++ b/.gitignore @@ -5,16 +5,16 @@ *.log # Build results -build -bin -obj -publish +build/ +bin/ +obj/ +publish/ # Test Output -_test-output +_test-output/ # NodeJS -node_modules +node_modules/ # Scripts (should be copied from node_modules on build) **/wwwroot/scripts/**/*.* \ No newline at end of file diff --git a/Dockerfile.build b/Dockerfile.build index 71cac6778..12f50cb14 100644 --- a/Dockerfile.build +++ b/Dockerfile.build @@ -34,19 +34,8 @@ COPY . . WORKDIR / -# Build Frontend -RUN cp -a /tmp/node_modules /src/Squidex/ \ - && cd /src/Squidex \ - && npm run build:copy \ - && npm run build \ - && npm run test:coverage - -# Test Backend -RUN dotnet restore \ - && dotnet test tests/Squidex.Infrastructure.Tests/Squidex.Infrastructure.Tests.csproj \ - && dotnet test tests/Squidex.Core.Tests/Squidex.Core.Tests.csproj \ - && dotnet test tests/Squidex.Read.Tests/Squidex.Read.Tests.csproj \ - && dotnet test tests/Squidex.Write.Tests/Squidex.Write.Tests.csproj - + +RUN dotnet restore + # Publish RUN dotnet publish src/Squidex/Squidex.csproj --output /out/ --configuration Release \ No newline at end of file diff --git a/build.ps1 b/build.ps1 index 011c72ec0..1bd6b7e23 100644 --- a/build.ps1 +++ b/build.ps1 @@ -1,11 +1,11 @@ # Build the image -docker build . -t build-image -f Dockerfile.build +docker build . -t squidex-build-image -f Dockerfile.build # Open the image -docker create --name build-cont build-image +docker create --name squidex-build-container squidex-build-image # Copy the output to the host file system -docker cp build-cont:/out ./publish +docker cp squidex-build-container:/out ./publish # Cleanup -docker rm build-cont \ No newline at end of file +docker rm squidex-build-container \ No newline at end of file