sharmajv-vpn
SUCCESS
21m 52s
History Source
SummaryIterations2Transcript29Dockerfile
Dockerfile28 lines · 1044 chars
# Multi-stage container to package 3VPN APK from source/context
FROM ubuntu:22.04 AS builder
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
    apt-get install -y --no-install-recommends \
        build-essential git wget ca-certificates && \
    rm -rf /var/lib/apt/lists/*

WORKDIR /src
COPY . /src

# Attempt to build from source if a build script exists
RUN if [ -x ./build.sh ]; then ./build.sh; else echo "No native source build detected; continuing."; fi

FROM ubuntu:22.04 AS runtime
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
    apt-get install -y --no-install-recommends ca-certificates wget && \
    rm -rf /var/lib/apt/lists/*

WORKDIR /app
# Copy artifacts from builder if present
COPY --from=builder /src/3VPN-release.apk /opt/3VPN-release.apk
COPY --from=builder /src/config.json /config.json

# Provide a simple default command that reports status
CMD [ "bash", "-lc", "if [ -f /opt/3VPN-release.apk ]; then echo '3VPN APK is present at /opt/3VPN-release.apk'; else echo '3VPN APK not found'; fi" ]