Skip to content

Commit

Permalink
Fix docker shared creds (#100)
Browse files Browse the repository at this point in the history
* manually define home

* comment env
  • Loading branch information
dradetsky committed Nov 10, 2020
1 parent 8719306 commit 64d7a62
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 2 additions & 0 deletions cmd/awscollector/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ COPY --from=build /workspace/build/linux/aoc_linux_x86_64 /awscollector
COPY --from=build /workspace/config.yaml /etc/otel-config.yaml

ENV RUN_IN_CONTAINER="True"
# aws-sdk-go needs $HOME to look up shared credentials
ENV HOME=/root
ENTRYPOINT ["/awscollector"]
CMD ["--config=/etc/otel-config.yaml"]
EXPOSE 55680 55681
12 changes: 9 additions & 3 deletions examples/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@ services:
image: amazon/aws-otel-collector:latest
command: ["--config=/etc/otel-agent-config.yaml", "--log-level=DEBUG"]
environment:
- AWS_ACCESS_KEY_ID=<to_be_added>
- AWS_SECRET_ACCESS_KEY=<to_be_added>
- AWS_REGION=<to_be_added>
- AWS_REGION=us-west-2
# Either uncomment and define these:
#
# - AWS_ACCESS_KEY_ID=<to_be_added>
# - AWS_SECRET_ACCESS_KEY=<to_be_added>
#
# Or define a profile available in your shared credentials file
#
# - AWS_PROFILE=myprofile

volumes:
- ../examples/config-test.yaml:/etc/otel-agent-config.yaml
Expand Down

0 comments on commit 64d7a62

Please sign in to comment.