# Build stage FROM golang:1.15-alpine AS build ARG VERSION ARG MUBENG_VERSION=v0.10.0 WORKDIR /app RUN wget https://github.com/kitabisa/mubeng/archive/refs/tags/$MUBENG_VERSION.tar.gz && tar -xzf $MUBENG_VERSION.tar.gz --strip-components 1 RUN go mod download RUN go build -ldflags "-s -w -X ktbs.dev/mubeng/common.Version=${VERSION}" \ -o ./bin/mubeng ./cmd/mubeng # Production build FROM python:3.10-alpine3.16 COPY --from=build /app/bin/mubeng /bin/mubeng # Installing the python scripts WORKDIR /app COPY requirements.txt /app RUN pip install --no-cache-dir -r requirements.txt COPY scrape_proxies.py /app COPY entrypoint.sh /app ENV HOME / VOLUME /mubeng/ ENTRYPOINT ["/app/entrypoint.sh"]