diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..17038a4 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,8 @@ +{ + "name": "VoxVera", + "build": { + "dockerfile": "../Dockerfile", + "context": ".." + }, + "workspaceFolder": "/workspace/VoxVera" +} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9dc9f95 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,26 @@ +FROM python:3.11-slim + +# Install system dependencies +RUN apt-get update && apt-get install -y \ + tor onionshare-cli \ + jq qrencode imagemagick poppler-utils \ + nodejs npm \ + && rm -rf /var/lib/apt/lists/* + +# Install npm tools for HTML/JS processing +RUN npm install -g javascript-obfuscator html-minifier-terser + +# Copy VoxVera source +COPY . /opt/voxvera +ENV PYTHONPATH=/opt/voxvera + +# Make voxvera command available +RUN echo '#!/bin/sh\nexec python3 -m voxvera.cli "$@"' > /usr/local/bin/voxvera \ + && chmod +x /usr/local/bin/voxvera + +# Prepare flyers volume +RUN mkdir /flyers && ln -s /flyers /opt/voxvera/host +VOLUME /flyers +WORKDIR /opt/voxvera + +CMD ["voxvera", "quickstart"] diff --git a/docs/docker.md b/docs/docker.md new file mode 100644 index 0000000..318d35d --- /dev/null +++ b/docs/docker.md @@ -0,0 +1,16 @@ +# Docker Usage + +A prebuilt image containing Tor, OnionShare and the `voxvera` CLI is published to +`ghcr.io/voxvera/voxvera`. + +```bash +# pull the image +docker pull ghcr.io/voxvera/voxvera:latest + +# run voxvera quickstart with flyers stored in ./flyers +mkdir -p flyers +docker run -it --rm -v "$(pwd)/flyers:/flyers" ghcr.io/voxvera/voxvera +``` + +The container uses `/flyers` as the working directory and runs `voxvera quickstart` +by default. All generated flyer files will appear in the mounted `flyers` folder.