Skip to content

Commit

Permalink
Merge pull request #461 from udsm-dhis2-lab/feature/remote-patient-hi…
Browse files Browse the repository at this point in the history
…story

Change docker file to allow multistage build
  • Loading branch information
josephatJ authored Oct 20, 2024
2 parents 82ef20b + 4993d9a commit 8e3d501
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
FROM udsmdhis2/icare-openmrs:1.0.0
# First stage: Build with node and other dependencies
FROM openjdk:11 AS build

RUN apt-get update && \
apt-get install -y curl gnupg apt-transport-https ca-certificates && \
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get install -y nodejs
RUN node -v

COPY ./docker/glowroot /glowroot
COPY ./docker/setenv.sh bin/
COPY ./docker/admin.json /glowroot/

# Second stage: Use the original OpenMRS image
FROM udsmdhis2/icare-openmrs:1.0.0

# Copy the built files from the first stage
COPY --from=build /glowroot /glowroot
COPY --from=build /bin/setenv.sh bin/

COPY ./omods/core/omod/target/icare-1.0.0-SNAPSHOT.omod .OpenMRS/modules/
COPY ./ui/dist/icare-ui webapps/ROOT
#COPY ./docs/build webapps/docs

0 comments on commit 8e3d501

Please sign in to comment.