-
Notifications
You must be signed in to change notification settings - Fork 7
Description
The README specifies that one can build the Runner image by specifying the path to a directory containing the S3 API DEB packages to use:
Lines 110 to 123 in 3f5bc57
| ## The Runner Image | |
| The runner image is responsible for running the iRODS S3 API. Building the runner image requires the DEB package for the iRODS S3 API to exist on the local machine. See the previous section for details on generating the package. | |
| To build the image, run the following command: | |
| ```bash | |
| docker build -t irods-s3-api-runner -f irods_runner.Dockerfile /path/to/packages/directory | |
| ``` | |
| If all goes well, you will have a containerized iRODS S3 API server! You can verify this by checking the version information. Below is an example. | |
| ```bash | |
| $ docker run -it --rm irods-s3-api-runner -v | |
| irods_s3_api <version>-<build_sha> | |
| ``` |
The only reason this works is because irods_runner.Dockerfile is specified as the Dockerfile to use with the -f option, and the path provided as the final argument is specifying the Docker build context. The effect is that the current working directory (.) on the host is the specified path. The Dockerfile doesn't use anything besides the package, so, it's not technically incorrect as far as where the build context "should" be. Here's where the file is being copied in for use:
| COPY ./*.deb / |
However, this makes using the Dockerfile awkward in the Docker Compose project for testing. The Docker Compose project specifies the build context as the root directory of this repository so that it can refer to the Dockerfile:
irods_client_s3_api/tests/docker/docker-compose.yml
Lines 17 to 20 in 3f5bc57
| irods-s3-api: | |
| build: | |
| context: ../.. | |
| dockerfile: irods_runner.Dockerfile |
The end result is that the user must copy the DEB package to the root directory of the repository in order to build the Compose project for tests.
There are a couple of options for this that I can think of:
- Create a way of specifying packages for the image build that does not rely on the Docker build context location.
- Do not rely on the
irods_runner.Dockerfilein the Compose project for running tests and instead create a separate Dockerfile for theirods-s3-apiservice.