Skip to content

Commit

Permalink
[#27] Add Dockerfile
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
  • Loading branch information
alexvanin committed Jun 10, 2022
1 parent 0cc6b4d commit 9fe9c88
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM python:3.6.15-slim-bullseye as s3-tests
WORKDIR /s3-tests
COPY . /s3-tests
RUN pip3 install -r requirements.txt
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
image:
@docker build -f Dockerfile -t s3-tests .
22 changes: 22 additions & 0 deletions NEOFS_README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
## Local run
To start S3 compatibility tests do the following steps:
1. Make sure `python 3.6` is installed:
```bash
Expand Down Expand Up @@ -164,3 +165,24 @@ KC_REALM=<name of the realm>
```
Also, if you don't want to see all debug output you can append a parameter `--logging-level=ERROR`. For more info see [here](https://nose.readthedocs.io/en/latest/usage.html).
## Docker run
In case of issues with environment setup, run tests from Docker environment.
To build an image use Makefile.
```bash
make image
```
It builds `s3-tests` image. Prepare config file as described above and run
`nosetests` in this container.
```bash
docker run \
-v `pwd`/your.conf:/s3-tests/s3tests.conf \
-e S3TEST_CONF=/s3-tests/s3tests.conf \
--network host \
-it s3-tests nosetests -v --nologcapture s3tests_boto3.functional
```
Specify correct configuration file path and network settings.

0 comments on commit 9fe9c88

Please sign in to comment.