Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

Commit

Permalink
Add Docker setup for running tools/format.sh. (#299)
Browse files Browse the repository at this point in the history
  • Loading branch information
g-easy authored Mar 20, 2019
1 parent 85fe74b commit 135850f
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tools/docker-format/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM ubuntu:cosmic

RUN apt update && \
apt install -y clang-format golang git python-pip && \
go get -v github.com/bazelbuild/buildtools/buildifier && \
pip install cmake_format

CMD ["/bin/bash"]
9 changes: 9 additions & 0 deletions tools/docker-format/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Docker container for automatic formatting.

Usage:

```shell
cd opencensus-cpp
docker build --tag opencensus-cpp/format tools/docker-format
docker run -v $PWD:/opencensus-cpp -it opencensus-cpp/format /opencensus-cpp/tools/docker-format/run.sh
```
4 changes: 4 additions & 0 deletions tools/docker-format/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
export PATH=/root/go/bin:$PATH
cd /opencensus-cpp
tools/format.sh

0 comments on commit 135850f

Please sign in to comment.