FROM alpine:3.21 AS builder RUN apk update && apk add --no-cache git libevent-dev autoconf automake build-base linux-headers RUN mkdir -p /ocproxy-container WORKDIR /ocproxy-container RUN git clone --branch v1.60 https://github.com/cernekee/ocproxy.git ocproxy-v1.60 && \ cd /ocproxy-container/ocproxy-v1.60 && \ sh autogen.sh && \ sh configure && \ make FROM alpine:3.21 RUN apk update && apk add --no-cache openconnect libevent ARG USER=ocproxy RUN addgroup -S "$USER" && \ adduser --disabled-password \ --gecos "" \ --ingroup "$USER" \ --no-create-home \ --uid "12345" \ "$USER" RUN mkdir -p /ocproxy-container WORKDIR /ocproxy-container COPY --from=builder /ocproxy-container/ocproxy-v1.60/ocproxy /usr/local/bin/ COPY ./entrypoint.sh . USER $USER EXPOSE 11080 ENTRYPOINT ["/ocproxy-container/entrypoint.sh"]