healexsystems / Healex.HL7-V2-Anonymizer

This console application allows you to batch anonymize HL7v2 messages with support for custom segments.
10 stars 6 forks source link

No linux bin in release #15

Open matthiasantierens opened 1 year ago

matthiasantierens commented 1 year ago

Hi,

There is no Linux bin in the release.

I tried compiling it from source, but that did not produce a Linux bin.

Thank you in advance.

matthiasantierens commented 1 year ago

I was able to build a container with a Linux bin

FROM alpine:latest as build
RUN apk add wget unzip dotnet6-sdk libc6-compat gcompat
RUN wget https://github.com/healexsystems/Healex.HL7-V2-Anonymizer/archive/refs/tags/v1.4.0.tar.gz
RUN tar -xf v1.4.0.tar.gz
WORKDIR /Healex.HL7-V2-Anonymizer-1.4.0
RUN dotnet restore || true
RUN dotnet build --no-restore || true
RUN dotnet publish -c release --self-contained --runtime linux-x64 || true

FROM alpine:latest
RUN apk --no-cache add gcompat libc6-compat libstdc++ icu-dev
WORKDIR /root/
COPY --from=build /Healex.HL7-V2-Anonymizer-1.4.0/Healex.HL7v2Anonymizer/bin/Release/net6.0/linux-x64/ ./
RUN adduser -D regularuser -u 501
RUN mv /root/* /home/regularuser/
RUN chown regularuser:regularuser /home/regularuser -R
RUN ln -s /home/regularuser/Healex.HL7v2Anonymizer /usr/local/bin/HL7v2Anonymizer
USER regularuser
WORKDIR /tmp
CMD ["/usr/local/bin/HL7v2Anonymizer"]

It works, but it is not clean.