Using in container images
The OI4 OEC layer uses containers to run the individual services. All container must follow the Open Container Initiative (OCI) specification and are not tied to any special implementation, like docker. As the name Docker is quite often used a synonym for container technologies, the name docker may appear in the documentation. Nevertheless, the service shall work in any OCI compliant container environment. The build and installation process of is described for Docker containers by dockerfiles and docker compose.
The oi4-oec-service has not many requirements on a container image. As the service is based on Node.js, it needs an up-to-date Node.js runtime to work. The service is tested with the current LTS version.
Demo services based on the oi4-oec-service
The demo services are based on the oi4-oec-service and can be used as a reference for building your own services. The demo services are available in the demo services GitHub repository. Prebuild docker images are available in docker hub.
Using unpublished versions of oi4-service in docker builds
Current, up-to-date versions of the oi4-service are published as node modules to the npm package repository.
It is always recommended to use these packages for any service. In cases where unreleased and unpublished versions of the oi4-oec-service should be used (e.g. when working on the oi4-oec-service itself) you have to asure that the local snapshot of the oi4-oec-service is used in the docker build process.
A yarn link
or similar that just create symlinks will not work. The best known solution so far is to physically copy the folder to the node_modules
folder.