mirror of
https://github.com/trailofbits/algo
synced 2024-11-18 09:25:38 +00:00
8bdd99c05d
* bump ansible to 2.8.3 * DigitalOcean: move to the latest modules * Add Hetzner Cloud * Scaleway and Lightsail fixes * lint missing roles * Update roles/cloud-hetzner/tasks/main.yml Add api_token Co-Authored-By: phaer <phaer@phaer.org> * Update roles/cloud-hetzner/tasks/main.yml Add api_token Co-Authored-By: phaer <phaer@phaer.org> * Try to run apt until succeeded * Scaleway modules upgrade * GCP: Refactoring, remove deprecated modules * Doc updates (#1552) * Update README.md Adding links and mentions of Exoscale aka CloudStack and Hetzner Cloud. * Update index.md Add the Hetzner Cloud to the docs index * Remove link to Win 10 IPsec instructions * Delete client-windows.md Unnecessary since the deprecation of IPsec for Win10. * Update deploy-from-ansible.md Added sections and required variables for CloudStack and Hetzner Cloud. * Update deploy-from-ansible.md Added sections for CloudStack and Hetzner, added req variables and examples, mentioned environment variables, and added links to the provider role section. * Update deploy-from-ansible.md Cosmetic changes to links, fix typo. * Update GCE variables * Update deploy-from-script-or-cloud-init-to-localhost.md Fix a finer point, and make variables list more readable. * update azure requirements * Python3 draft * set LANG=c to the p12 password generation task * Update README * Install cloud requirements to the existing venv * FreeBSD fix * env->.env fixes * lightsail_region_facts fix * yaml syntax fix * Update README for Python 3 (#1564) * Update README for Python 3 * Remove tabs and tweak instructions * Remove cosmetic command indentation * Update README.md * Update README for Python 3 (#1565) * DO fix for "found unpermitted parameters: id" * Verify Python version * Remove ubuntu 16.04 from readme * Revert back DigitalOcean module * Update deploy-from-script-or-cloud-init-to-localhost.md * env to .env
37 lines
1.3 KiB
Docker
37 lines
1.3 KiB
Docker
FROM python:3-alpine
|
|
|
|
ARG VERSION="git"
|
|
ARG PACKAGES="bash libffi openssh-client openssl rsync tini"
|
|
ARG BUILD_PACKAGES="gcc libffi-dev linux-headers make musl-dev openssl-dev"
|
|
|
|
LABEL name="algo" \
|
|
version="${VERSION}" \
|
|
description="Set up a personal IPsec VPN in the cloud" \
|
|
maintainer="Trail of Bits <http://github.com/trailofbits/algo>"
|
|
|
|
RUN apk --no-cache add ${PACKAGES}
|
|
RUN adduser -D -H -u 19857 algo
|
|
RUN mkdir -p /algo && mkdir -p /algo/configs
|
|
|
|
WORKDIR /algo
|
|
COPY requirements.txt .
|
|
RUN apk --no-cache add ${BUILD_PACKAGES} && \
|
|
python3 -m pip --no-cache-dir install -U pip && \
|
|
python3 -m pip --no-cache-dir install virtualenv && \
|
|
python3 -m virtualenv .env && \
|
|
source .env/bin/activate && \
|
|
python3 -m pip --no-cache-dir install -r requirements.txt && \
|
|
apk del ${BUILD_PACKAGES}
|
|
COPY . .
|
|
RUN chmod 0755 /algo/algo-docker.sh
|
|
|
|
# Because of the bind mounting of `configs/`, we need to run as the `root` user
|
|
# This may break in cases where user namespacing is enabled, so hopefully Docker
|
|
# sorts out a way to set permissions on bind-mounted volumes (`docker run -v`)
|
|
# before userns becomes default
|
|
# Note that not running as root will break if we don't have a matching userid
|
|
# in the container. The filesystem has also been set up to assume root.
|
|
USER root
|
|
CMD [ "/algo/algo-docker.sh" ]
|
|
ENTRYPOINT [ "/sbin/tini", "--" ]
|