Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example for docker-compose #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ $ docker run -it --rm \

This will add your current directory as a volume to the container and publish host port to container port.

For a working example please take a look at the [Makefile](https://github.com/cnadiminti/docker-aws-sam-local/blob/master/Makefile) in the source repository.
For working examples please take a look at the [`Makefile`](https://github.com/cnadiminti/docker-aws-sam-local/blob/master/Makefile) and [`docker-compose.yaml`](https://github.com/cnadiminti/docker-aws-sam-local/blob/master/docker-compose.yaml) files in the source repository. Note that `PWD` above should resolve to a path on the host (the machine running Docker), not something within a Docker container.

## License

Expand Down
11 changes: 11 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: '3'

services:
aws-sam-local:
image: cnadiminti/aws-sam-local
command: local start-api --docker-volume-basedir "$PWD/example" --host 0.0.0.0
ports:
- '3000:3000'
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./example:/var/opt