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

USM-20-update-docker #21

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 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 Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ FROM docker.io/microlib/golang-base:1.7

# This will change depending on each microservice entry point
# This will change to the binary start in production based images
CMD ["/bin/sh", "go run main.go"]
CMD ["/usr/local/go/bin/go", "run", "main.go"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@luigizuccarelli I was wondering if we shouldn't add an ENTRYPOINT that simply runs the go executable. And then the CMD on top of that. In that way we might not need to change the Dockerfile for production, we just run it with a different command.

What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes entrypoint is the correct way

19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,22 @@ none
}]
}
```

***

## Development

To build an image locally execute the following script

```
docker build -t usermanager:dev .

```


To execute it run the following script

```
docker run -it --name usermanager -v /<your-dev-direcotory>/src/github.com/microlib/usermanager/:/go --privileged <image-id>

```