Skip to content

Commit

Permalink
Merge pull request #53 from AstuteSource/devcontainer
Browse files Browse the repository at this point in the history
Add Dockerfile for developers to use to run Chasten
  • Loading branch information
laurennevill authored Oct 2, 2023
2 parents 0e64d12 + 7939b9e commit 5180d49
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -366,3 +366,6 @@ coverage.txt

# coverage report
coverage.json

# bash command history
.bash_history
33 changes: 33 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM ubuntu

RUN apt-get update -y \
&& apt-get upgrade -y \
&& apt-get install software-properties-common -y \
&& add-apt-repository ppa:deadsnakes/ppa -y \
&& DEBIAN_FRONTEND=noninteractive apt-get install python3.11 -y \
&& update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1 \
&& update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 2 \
&& apt-get install python-is-python3 -y

RUN apt-get install -y curl \
&& curl -sSL https://install.python-poetry.org | python - \
&& apt install -y python3.11 python3.11-distutils \
&& curl -sSl https://bootstrap.pypa.io/get-pip.py | python -

RUN apt-get install -y libsqlite3-dev \
&& apt-get install python3.11-dev -y \
&& apt-get install -y libgmp-dev \
portaudio19-dev \
libssl-dev \
libpcap-dev \
libffi-dev \
libxml2-dev \
libxslt1-dev \
libblas-dev \
libatlas-base-dev \
&& apt-get install -y gcc-x86-64-linux-gnu

CMD cd root \
&& mkdir src

ENTRYPOINT export PATH="/root/.local/bin:$PATH" && cd root/src && /bin/bash
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,25 @@ Follow these steps to install the `chasten` program:
- Type `pipx list` and confirm that Chasten is installed
- Type `chasten --help` to learn how to use the tool

## 🐋 Docker

There is also the option to use [Docker](https://www.docker.com/) to use `chasten`

Follow these steps to utilize Docker:

- Install [Docker Desktop](https://docs.docker.com/get-docker/) for your operating system
- Ensure Docker Desktop is running
- `cd` into the chasten directory where the `Dockerfile` is located
- Type `docker build -t chasten .` to build the container
- Type one of the following commands to run the container:
- Windows (Command Prompt) -> `docker run --rm -v "%cd%":/root/src -it chasten`
- Windows (Powershell) -> `docker run --rm -v ${pwd}:/root/src -it chasten`
- Mac/Ubuntu -> `docker run --rm -v $(pwd):/root/src -it chasten`
- Inside the container type `poetry install`
- Outside of the container type `docker ps` to view running container information
- Outside of the container type `docker commit <your-container-id> <your-image-name>` to save the dependecy installation
- Now you can use Docker for all of your `chasten` needs!

## 🪂 Configuration

You can configure `chasten` with two YAML files, normally called `config.yml`
Expand Down

0 comments on commit 5180d49

Please sign in to comment.