QuellCode/CentronERP war nur als Gitlink (Submodul-Referenz auf 79c1142) getrackt, ohne .gitmodules und ohne erreichbares Remote. Der Untersuchungsgegenstand der Versuchsreihe war damit nicht reproduzierbar gesichert: Ein Klon haette ein leeres Verzeichnis erhalten, und die Belege der 3.287 Anforderungen waeren nicht ueberpruefbar gewesen. Umstellung: - Historie nach c:\DEV\CentronERP_git_snapshot_79c1142 ausgelagert (vollstaendig lesbar, enthaelt 79c1142 und Vorgaenger 89ccfd6) - Gitlink aus dem Index entfernt - Dateiinhalt aufgenommen: 24.557 Dateien, rund 333 MB Die verschachtelte .gitignore der Codebasis gilt weiter, Build-Artefakte bleiben ausgeschlossen. Details in Versuche/Versuch_01/_Codebasis-Nachweis.md
56 lines
2.1 KiB
Docker
56 lines
2.1 KiB
Docker
FROM mcr.microsoft.com/dotnet/sdk:10.0.201-alpine3.23 AS base
|
|
ARG centron_version
|
|
ARG centron_git_commit
|
|
ENV CENTRON_VERSION=$centron_version
|
|
ENV CENTRON_GIT_COMMIT=$centron_git_commit
|
|
|
|
RUN apk add --no-cache sed
|
|
RUN mkdir build
|
|
WORKDIR /build
|
|
COPY ./ ./
|
|
RUN rm -f src/webservice/Centron.Host.Console/app.config
|
|
RUN ls src/webservice/Centron.Host.Console/
|
|
RUN mv src/webservice/Centron.Host.Console/additional.props.docker src/webservice/Centron.Host.Console/additional.props
|
|
|
|
RUN cat Directory.Build.props
|
|
|
|
### be carefull, the following replacement does not consider the xml structure. It does a stupid search and replace
|
|
RUN sed -i "s/<Version>1.0.0.0<\/Version>/<Version>${CENTRON_VERSION}<\/Version>/" ./Directory.Build.props
|
|
RUN sed -i "s/<GitCommitId><\/GitCommitId>/<GitCommitId>${CENTRON_GIT_COMMIT}<\/GitCommitId>/" ./Directory.Build.props
|
|
RUN cat Directory.Build.props
|
|
ARG dx_license
|
|
RUN mkdir -p $HOME/.config/DevExpress && \
|
|
echo "$dx_license" > $HOME/.config/DevExpress/DevExpress_License.txt
|
|
RUN dotnet publish "./src/webservice/Centron.Host.Console/Centron.Host.Console.csproj" -c release --self-contained true -o ./app
|
|
|
|
|
|
### build finished
|
|
FROM mcr.microsoft.com/dotnet/runtime:10.0.5-alpine3.23
|
|
ARG centron_version
|
|
ARG centron_git_commit
|
|
ENV CENTRON_VERSION=$centron_version
|
|
ENV CENTRON_GIT_COMMIT=$centron_git_commit
|
|
|
|
RUN apk add --no-cache icu-data-full icu-libs
|
|
|
|
RUN apk add --no-cache tzdata
|
|
|
|
RUN apk add --no-cache fontconfig
|
|
|
|
RUN apk add ttf-dejavu && \
|
|
apk add msttcorefonts-installer && \
|
|
apk add ttf-dejavu && \
|
|
update-ms-fonts && \
|
|
fc-cache -f
|
|
|
|
RUN ln -s /usr/lib/libfontconfig.so.1 /usr/lib/libfontconfig.so && \
|
|
ln -s /lib/libuuid.so.1 /usr/lib/libuuid.so.1 && \
|
|
ln -s /lib/libc.musl-x86_64.so.1 /usr/lib/libc.musl-x86_64.so.1
|
|
ENV LD_LIBRARY_PATH=/usr/lib
|
|
|
|
ENV TZ=Europe/Berlin
|
|
ENV DOTNET_RUNNING_IN_CONTAINER=true
|
|
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
|
|
COPY --from=base /build/app /app
|
|
#RUN /app/Centron.Host.Console configure 1234 'https://api.c-entron.de/' 'Server=docker-centron_db_1; Database=Centron; User Id=SA; Password=SA!password'
|
|
WORKDIR app |