MikroTik Solutions

Artifact [394760ed32]
Login

Artifact [394760ed32]

Artifact 394760ed32c43d846211722215b9c1886186e396b87d24842e278505d2e3aa7b:


# syntax=docker/dockerfile:1.0

## STAGE 1: Build the static binary
FROM alpine:edge AS build
ARG VERSION=master
RUN apk add --no-cache autoconf automake build-base git
RUN git clone --depth 1 --branch ${VERSION} https://github.com/tinyproxy/tinyproxy
RUN set -x \
    && cd tinyproxy \
    && ./autogen.sh \
    && ./configure CFLAGS="-Os -s -static" \
        --disable-manpage_support \
        --disable-transparent \
        --disable-xtinyproxy \
        --prefix=/ \
    && make -j12
RUN mkdir /empty

## STAGE 2: Build the container proper
FROM scratch AS run
COPY --from=build /tinyproxy/src/tinyproxy /bin/
COPY --from=build /empty/ /etc/

# Start it as a server.
EXPOSE 8888/tcp
ENTRYPOINT [ "/bin/tinyproxy", "-d", \
    "-c", "/etc/tinyproxy.conf" ]