mirror of
https://github.com/linuxserver/docker-socket-proxy.git
synced 2026-01-20 12:22:14 +08:00
* Add first version of tests From https://github.com/Tecnativa/docker-socket-proxy/pull/14 * Expand tests * Add GH CI * Apply suggestions * Apply autopretty template + fix prettier * Fix isort * Apply autoprettier * Fix VSCode settings * Make tests run in parallel * Build docker image before testing * Update workspace settings * Try multi-platform builds and push to ghcr.io * Push to docker hub as well from ci * Upgrade autopretty * Update pyproject configurations * Improve test configuration and execution TT26468 * Provide initial conftest * Improve tests * Add python3 in image * Remove POST rule from proxy * Build image before testing and push at the end Builds the image (in single arch) before testing Loads the image into local docker (See https://github.com/docker/build-push-action#export-image-to-docker) Rebuilds and pushes the final image in multi-arch at the end. * Fix python path * Remove build fixture from tests to see if image is built in CI * Organize docker tests definition and document * Restore fixture allowing usage for local testing This reverts commit dc0b60e63f05ef041383b981995f9673e919054b and allows using `--prebuild` CLI flag for pytest when doing local tests. Co-authored-by: Jairo Llopis <jairo.llopis@tecnativa.com>
46 lines
1.0 KiB
Docker
46 lines
1.0 KiB
Docker
ARG REPO=library
|
|
FROM ${REPO}/haproxy:1.9-alpine
|
|
|
|
EXPOSE 2375
|
|
ENV ALLOW_RESTARTS=0 \
|
|
AUTH=0 \
|
|
BUILD=0 \
|
|
COMMIT=0 \
|
|
CONFIGS=0 \
|
|
CONTAINERS=0 \
|
|
DISTRIBUTION=0 \
|
|
EVENTS=1 \
|
|
EXEC=0 \
|
|
IMAGES=0 \
|
|
INFO=0 \
|
|
LOG_LEVEL=info \
|
|
NETWORKS=0 \
|
|
NODES=0 \
|
|
PING=1 \
|
|
PLUGINS=0 \
|
|
POST=0 \
|
|
SECRETS=0 \
|
|
SERVICES=0 \
|
|
SESSION=0 \
|
|
SWARM=0 \
|
|
SYSTEM=0 \
|
|
TASKS=0 \
|
|
VERSION=1 \
|
|
VOLUMES=0
|
|
COPY haproxy.cfg /usr/local/etc/haproxy/haproxy.cfg
|
|
|
|
# Install python/pip
|
|
ENV PYTHONUNBUFFERED=1
|
|
RUN apk add --update --no-cache python3 && ln -sf $(which python3) /usr/local/bin/python
|
|
RUN python -m ensurepip && python -m pip install --no-cache --upgrade pip setuptools
|
|
|
|
# Metadata
|
|
ARG VCS_REF
|
|
ARG BUILD_DATE
|
|
LABEL org.label-schema.schema-version="1.0" \
|
|
org.label-schema.vendor=Tecnativa \
|
|
org.label-schema.license=Apache-2.0 \
|
|
org.label-schema.build-date="$BUILD_DATE" \
|
|
org.label-schema.vcs-ref="$VCS_REF" \
|
|
org.label-schema.vcs-url="https://github.com/Tecnativa/docker-socket-proxy"
|