Skip to content

Deploying the API

Location of docker images

Private docker images can be found in the url facilitated to you, similar to:{company}.

Getting the images

Once Docker is installed in the target machine, be sure to authenticate to the private registry following these steps.

docker pull<company>/medical-language-api:latest

Moving the image to a machine without access to the internet

In case you are deploying the image at a server without access to the internet, it is still possible to deploy a docker container with ease. You can pull the image on a computer with internet access and then transfer the image to your target machine.

# Pull the image as you would do normally
docker pull<company>/medical-language-api:latest

Then you can save this image to a file and transfer the file to the target machine.

# Save the image as a file
docker save -o iomed_medical_language_api.docker medical-language-api

Once the image is in it's destination, you can load it to the local docker image registry:

# Load the docker image from a file
docker load iomed_medical_language_api.docker

Running the image

Once the image is installed in the server, just run it to start the application. The HTTP server runs at port 5000, but you can change it when running the container to any port that you might want. The container expects an APIKEY in it's environment to run correctly. Simpy pass the environment variable when running the container to make it available.

docker run --detach \
           --publish 5000:5000 \
           --env APIKEY="11010010101001010"\{company}/medical-language-api
There are many option when running the container that are note covered here. Please refer to the Docker documentation for other possible configurations.