-
Notifications
You must be signed in to change notification settings - Fork 43
/
Dockerfile
30 lines (21 loc) · 991 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
################################################################################
# shellcheck
FROM koalaman/shellcheck-alpine:stable AS shellcheck
WORKDIR /source
COPY . .
# Run shell check on all the shell files.
RUN find . -type f -name '*.sh' | wc -l \
&& find . -type f -name '*.sh' | xargs shellcheck --external-sources --color=always
########################################################################################################################
# .NET 7
FROM mcr.microsoft.com/dotnet/sdk:7.0-alpine AS test
ENV CI=true
WORKDIR /source
# Copy just the solution and proj files to make best use of docker image caching.
COPY *.props *.sln ./
COPY ./src/Castle.Core.AsyncInterceptor/*.csproj ./src/Castle.Core.AsyncInterceptor/
COPY ./test/Castle.Core.AsyncInterceptor.Tests/*.csproj ./test/Castle.Core.AsyncInterceptor.Tests/
# Run restore on just the project files, this should cache the image after restore.
RUN dotnet restore
COPY . .
RUN ./coverage.sh net7.0 Debug