Dockerfilebakā¢2.19 kB
# Use the official InterSystems IRIS for Health Community Edition image
# Switch to the root user to perform administrative tasks
USER root
# Create necessary directories for scripts, configuration, and data storage
RUN mkdir -p /scripts # Directory for storing setup scripts
RUN mkdir -p /data/ifconfig # Directory for configuration data
RUN mkdir -p /fhirdata # Directory for storing FHIR-related data
# Copy FHIR data set into the container
COPY ./fhirdata/100Set /fhirdata/
# Copy configuration merge file for InterSystems IRIS
COPY ./merge/CMF.cpf /merge/CMF.cpf
# Set correct ownership of directories for the IRIS user and group
RUN chown -R ${ISC_PACKAGE_MGRUSER}:${ISC_PACKAGE_IRISGROUP} /data/
RUN chown -R ${ISC_PACKAGE_MGRUSER}:${ISC_PACKAGE_IRISGROUP} /fhirdata/
RUN chown -R ${ISC_PACKAGE_MGRUSER}:${ISC_PACKAGE_IRISGROUP} /merge/
# Copy necessary scripts for configuring the FHIR server and ZPM package manager
COPY ./scripts/fhirserver.script /scripts/fhirserver.script
COPY ./scripts/enablecors.script /scripts/enablecors.script
COPY ./scripts/zpm.script /scripts/zpm.script
# Ensure scripts have the correct ownership
RUN chown -R ${ISC_PACKAGE_MGRUSER}:${ISC_PACKAGE_IRISGROUP} /scripts/
# Switch to the IRIS user for security best practices
USER ${ISC_PACKAGE_MGRUSER}
# Start IRIS, execute the FHIR server setup script, and then stop IRIS
RUN \
iris start IRIS && \
iris session IRIS < /scripts/fhirserver.script && \
iris session IRIS < /scripts/enablecors.script && \
iris stop IRIS quietly # Gracefully stop IRIS
# Ensure the user remains the IRIS user
USER ${ISC_PACKAGE_MGRUSER}
# Expose the necessary ports:
# - 52773: Web interface (Management Portal, FHIR API)
# - 1972: InterSystems IRIS SuperServer (database connectivity)
# - 53773: Optional, used for system monitoring or analytics
EXPOSE 52773 1972 52773 53773
# Set environment variables for IRIS configuration, Specify custom data directory, # Specify configuration merge file
ENV ISC_DATA_DIRECTORY=/data/ifconfig
ENV ISC_CPF_MERGE_FILE=/merge/CMF.cpf
# Define the entrypoint to execute when the container starts
ENTRYPOINT [ "/iris-main" ]