diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..92e63667 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,14 @@ +.git/ +.github/ +# configs/ +# images/ +# scripts/ +# stubs/ +# vscode-extension/ +.gitignore +# CITATION.cff +# README.md +# logo.png +# poetry.lock +.dockerignore + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..d7e825c1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM python:3.14-slim-trixie + +COPY . /usr/src/glitch +WORKDIR /usr/src/glitch +RUN \ + apt-get update \ + && apt-get install -y --no-install-recommends ruby \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +RUN python -m pip install --no-cache-dir -e . + +WORKDIR /glitch + +ENTRYPOINT ["glitch"] diff --git a/README.md b/README.md index fba10441..067ea0bd 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,14 @@ is installed via Poetry. Since Poetry uses virtual environments it does not create a binary for GLITCH available in the user's PATH, which is required for the VSCode extension._ +### Docker + +You can build a docker image running: +```bash +docker build -t glitch . +``` +Please read `usage` > `Docker` + ## Usage To explore all available options, use the command: @@ -90,6 +98,18 @@ poetry shell glitch --help ``` +### Docker +Please read `install` > `docker` first + +Use `docker run glitch [OPTIONS] PATH [OUTPUT]` + +Examples: + +```bash +docker run --rm glitch --help +docker run --rm -v /Users/user/.../project:/glitch:ro glitch --tech terraform . +``` + ## Tests To run the tests for GLITCH go to the folder ```glitch``` and run: