Skip to content

Commit

Permalink
build: Add Dockerfile and add docker instructions to README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
kylegalloway committed Oct 7, 2019
1 parent be3db6b commit 7f04fc9
Show file tree
Hide file tree
Showing 2 changed files with 28 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 rust:latest

ENV SRC_DIR /src
RUN mkdir $SRC_DIR
WORKDIR $SRC_DIR
VOLUME $SRC_DIR

CMD ["/bin/bash"]

19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,25 @@ dumb_terminal = ["colored/no-color"]
You can use have even finer control by using the
`colored::control::set_override` method.

## Build with Docker

### Install Docker

Use the install instructions located [here](https://docs.docker.com/v17.12/install/)

### Build the Docker image

```docker build -t colored_image .```

### Build the library

```docker run --rm -it -v "$PWD":/src -u `id -u`:`id -g` colored_image /bin/bash -c "cargo build"```

### Test the library

```docker run --rm -it -v "$PWD":/src -u `id -u`:`id -g` colored_image /bin/bash -c "cargo test"```


## Todo

- **More tests ?**: We always welcome more tests! Please contribute!
Expand Down

0 comments on commit 7f04fc9

Please sign in to comment.