-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy patharm64v8.Dockerfile
More file actions
46 lines (41 loc) · 2.2 KB
/
Copy patharm64v8.Dockerfile
File metadata and controls
46 lines (41 loc) · 2.2 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# This is a manifest image, will pull the image with the same arch as the builder machine
FROM mcr.microsoft.com/dotnet/sdk:6.0.401-bullseye-slim AS builder
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
ENV LC_ALL en_US.UTF-8
RUN apt-get update \
&& apt-get install -qq --no-install-recommends qemu qemu-user-static qemu-user binfmt-support
WORKDIR /source
COPY nuget.config nuget.config
COPY Build/Common.csproj Build/Common.csproj
COPY SPRYPayServer.Abstractions/SPRYPayServer.Abstractions.csproj SPRYPayServer.Abstractions/SPRYPayServer.Abstractions.csproj
COPY SPRYPayServer/SPRYPayServer.csproj SPRYPayServer/SPRYPayServer.csproj
COPY SPRYPayServer.Common/SPRYPayServer.Common.csproj SPRYPayServer.Common/SPRYPayServer.Common.csproj
COPY SPRYPayServer.Rating/SPRYPayServer.Rating.csproj SPRYPayServer.Rating/SPRYPayServer.Rating.csproj
COPY SPRYPayServer.Data/SPRYPayServer.Data.csproj SPRYPayServer.Data/SPRYPayServer.Data.csproj
COPY SPRYPayServer.Client/SPRYPayServer.Client.csproj SPRYPayServer.Client/SPRYPayServer.Client.csproj
RUN cd SPRYPayServer && dotnet restore
COPY SPRYPayServer.Common/. SPRYPayServer.Common/.
COPY SPRYPayServer.Rating/. SPRYPayServer.Rating/.
COPY SPRYPayServer.Data/. SPRYPayServer.Data/.
COPY SPRYPayServer.Client/. SPRYPayServer.Client/.
COPY SPRYPayServer.Abstractions/. SPRYPayServer.Abstractions/.
COPY SPRYPayServer/. SPRYPayServer/.
COPY Build/Version.csproj Build/Version.csproj
ARG CONFIGURATION_NAME=Release
ARG GIT_COMMIT
RUN cd SPRYPayServer && dotnet publish -p:GitCommit=${GIT_COMMIT} --output /app/ --configuration ${CONFIGURATION_NAME}
# Force the builder machine to take make an arm runtime image. This is fine as long as the builder does not run any program
FROM mcr.microsoft.com/dotnet/aspnet:6.0.9-bullseye-slim-arm64v8
COPY --from=builder /usr/bin/qemu-aarch64-static /usr/bin/qemu-aarch64-static
RUN apt-get update && apt-get install -y --no-install-recommends iproute2 openssh-client \
&& rm -rf /var/lib/apt/lists/*
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
WORKDIR /datadir
WORKDIR /app
ENV SPRYPAY_DATADIR=/datadir
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
VOLUME /datadir
COPY --from=builder "/app" .
COPY docker-entrypoint.sh docker-entrypoint.sh
ENTRYPOINT ["/app/docker-entrypoint.sh"]