Skip to content

Commit

Permalink
feat: dockerfile (#48)
Browse files Browse the repository at this point in the history
* feat: dockerfile

* feat: add docker and docker compose links

* fix: typo
  • Loading branch information
pgjbz authored Jan 26, 2024
1 parent 1e628fd commit 43f02cb
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM docker.io/allfunc/mdbook
WORKDIR /book
COPY . .
EXPOSE 3000
RUN groupadd book && \
adduser --ingroup book --no-create-home book && \
chown -R book:book /book
USER book
ENTRYPOINT [ "mdbook", "serve" ]
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ Para servir o livro localmente use:
$ mdbook serve
```

Caso deseje e tenha o [Docker](https://www.docker.com/get-started/) com [Docker Compose](https://docs.docker.com/compose/) instalado em sua máquina, é possível utilizar o comando abaixo para servir o livro localmente.

```sh
docker compose up
```

## Autores

- Paulo Gabriel Justino Bezerra - Desenvolvedor Java - [Linkedin](https://www.linkedin.com/in/paulogjbezerra/)
Expand Down
10 changes: 10 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: '3'

services:
book4noobs:
image: docker.io/allfunc/mdbook
volumes:
- .:/book
command: [ "serve" ]
ports:
- "3000:3000"

0 comments on commit 43f02cb

Please sign in to comment.