Skip to content

Commit f01793f

Browse files
committed
[PCAPI] Add instructions about testing PCAPI locally with Docker.
Signed-off-by: Giacomo Marciani <mgiacomo@amazon.com>
1 parent 7a9156a commit f01793f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

api/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,16 @@ Invoke a deployed ParallelCluster API:
111111
python client/example.py --region [REGION] --stack-name [PCAPI_STACK_NAME]
112112
```
113113

114+
### Testing with Docker
115+
You can test ParallelCluster API locally with Docker.
116+
To this aim you need to build the Docker image:
117+
```
118+
bash tests/docker-build.sh
119+
```
120+
121+
then run ParallelCluster API as Flask application:
122+
```
123+
docker run -p 8080:8080 -v ~/.aws:/root/.aws:ro --entrypoint python pcluster-lambda -m pcluster.api.flask_app
124+
```
125+
126+
Notice that, the application will use the AWS credentials of your local default profile, defined in `~/.aws/config`.

0 commit comments

Comments
 (0)