Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FI-2338: New Dockerfile for validator #458

Merged
merged 3 commits into from Mar 7, 2024
Merged

Conversation

dehall
Copy link
Contributor

@dehall dehall commented Feb 28, 2024

Summary

This PR replaces the dockerfile for the HL7 validator service with a new one intended to be deployed to Docker Hub, plus a short README explaining what it is and how to deploy it. I don't think end users should ever really have to worry about this, it's just for the dev team.

There are a few reasons we want our own wrapper around the HL7 validator wrapper service:

  1. The service reaches out to the internet to fetch IGs, so MITRE developers need to add the MITRE certs
  2. The official image is not a multi-arch build, it's currently amd64 only
  3. This approach allows much cleaner version management compared to a per-repo Dockerfile like the original Dockerfile.fhir_resource_validator
  4. It allows us to release "known good" versions so that test kits can safely point to latest

The image just fetches and runs a release JAR from the official repo, since JARs are platform-independent. Most of the rest is just copied from the official Dockerfile to ensure it's a drop-in replacement with the official image (i.e., the username "ktor", the file paths, and the run args). To minimize changes going forward, it takes the version number as a build argument, so we can push new versions of the image without code changes.

Testing Guidance

I haven't actually pushed the image yet since we should be sure we agree on the name & details first.

To try running the command in the readme without pushing to docker hub you can change the --push near the end to --load

Copy link

codecov bot commented Feb 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.68%. Comparing base (fd6771c) to head (bf61257).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #458   +/-   ##
=======================================
  Coverage   77.68%   77.68%           
=======================================
  Files         233      233           
  Lines       11591    11591           
  Branches     1087     1087           
=======================================
  Hits         9004     9004           
  Misses       1967     1967           
  Partials      620      620           
Flag Coverage Δ
backend 93.90% <ø> (ø)
frontend 70.77% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dehall dehall force-pushed the fi-2338-hl7-validator-docker branch from b14f968 to 8094a79 Compare February 29, 2024 11:35

```sh
export PROJECT_VERSION=1.0.50
docker buildx build --platform linux/arm64,linux/amd64 --build-arg "PROJECT_VERSION=${PROJECT_VERSION}" --tag "infernocommunity/inferno-resource-validator:${PROJECT_VERSION}" --tag infernocommunity/inferno-resource-validator:latest --push .
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you stick this in a little script so we don't have to copy/paste it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a script with the version number as a required command-line arg

@dehall dehall requested a review from Jammjammjamm March 4, 2024 14:35
@dehall dehall force-pushed the fi-2338-hl7-validator-docker branch from 73d1f2d to bf61257 Compare March 7, 2024 12:26
@dehall dehall merged commit d3d2a0d into main Mar 7, 2024
10 checks passed
@dehall dehall deleted the fi-2338-hl7-validator-docker branch March 7, 2024 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants