-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.linux-build
More file actions
23 lines (22 loc) · 977 Bytes
/
Copy pathDockerfile.linux-build
File metadata and controls
23 lines (22 loc) · 977 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Linux builder image for SharpPostgres.
#
# This image contains the .NET 10 SDK plus the toolchain Native AOT needs
# to produce a Linux x64 shared library: clang (the AOT linker) and the
# zlib dev headers (a runtime dependency baked into AOT output).
#
# The image is *only* used for building; it does not need PG dev headers
# because Linux .so files resolve undefined symbols at dlopen() time
# (driven by the LinkerArg in SharpPostgres.csproj).
#
# Build the image once:
# docker build -t sharppostgres-builder -f Dockerfile.linux-build .
#
# Run a build (mount source, write output to artifacts/linux-x64):
# docker run --rm -v ${PWD}:/src -w /src sharppostgres-builder \
# dotnet publish SharpPostgres/SharpPostgres.csproj \
# -c Release -r linux-x64 -o /src/artifacts/linux-x64
FROM mcr.microsoft.com/dotnet/sdk:10.0
RUN apt-get update \
&& apt-get install -y --no-install-recommends clang zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /src