-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (24 loc) · 956 Bytes
/
Copy pathDockerfile
File metadata and controls
32 lines (24 loc) · 956 Bytes
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
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
# Download FHIR-Converter
RUN git clone https://github.com/CDCgov/dibbs-FHIR-Converter.git --branch laura-victor/1345-dosage-text --depth 1 /App
WORKDIR /App
RUN dotnet restore
RUN dotnet publish \
src/Dibbs.FhirConverterApi/Dibbs.FhirConverterApi.csproj \
-c Release \
-r linux-x64 \
--self-contained true \
-o output
RUN apt-get update && apt-get install -y curl jq
# Get an up to date copy of active rxnorm codes and names
RUN rm output/rxnorm.csv
RUN curl 'https://rxnav.nlm.nih.gov/REST/allstatus.json?status=active' \
| jq --raw-output '[["code", "name"]] + [.minConceptGroup.minConcept[] | [.rxcui, .name]] | .[] | @csv' \
> output/rxnorm.csv
FROM mcr.microsoft.com/dotnet/aspnet:10.0
WORKDIR /App
COPY --from=build /App/output .
COPY --from=build /App/data/Templates ./templates
EXPOSE 8080
ENV TEMPLATES_PATH=./templates/eCR
ENTRYPOINT ["dotnet", "Dibbs.FhirConverterApi.dll"]