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

🐳 small Dockerfile improvment and updated docker image usage #109

Merged
merged 1 commit into from Jul 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion Dockerfile
@@ -1,8 +1,8 @@
FROM node:10.16.0-alpine
ENV NODE_ENV=production

# install dependencies
RUN apk add --no-cache git=2.20.1-r0
ENV NODE_ENV=production

# build gitmoji-changelog from source
WORKDIR /usr/src/gitmoji-changelog
Expand All @@ -11,4 +11,5 @@ RUN yarn --frozen-lockfile && yarn cache clean

# run gitmoji-changelog on container startup
RUN ln -s /usr/src/gitmoji-changelog/node_modules/.bin/gitmoji-changelog /usr/bin
WORKDIR /app
ENTRYPOINT ["gitmoji-changelog"]
6 changes: 4 additions & 2 deletions README.md
Expand Up @@ -124,15 +124,17 @@ yarn lint

Launch `gitmoji-changelog` using the [official Docker image](https://hub.docker.com/r/yvonnick/gitmoji-changelog):
```sh
docker container run -it -v $(pwd):/app -w /app --rm yvonnick/gitmoji-changelog:latest
docker container run -it -v $(pwd):/app --rm yvonnick/gitmoji-changelog:latest
```

> `/app` is the directory where gitmoji-changelog expect your project in the container.

You can also build the image locally and use it directly:
```sh
# build the image:
docker image build -t yvonnick/gitmoji-changelog:dev .
# use it:
docker container run -it -v $(pwd):/app -w /app --rm yvonnick/gitmoji-changelog:dev
docker container run -it -v $(pwd):/app --rm yvonnick/gitmoji-changelog:dev
```

## Author
Expand Down