diff --git a/sandbox/Dockerfile b/sandbox/Dockerfile index 63378fa..0ee4b03 100644 --- a/sandbox/Dockerfile +++ b/sandbox/Dockerfile @@ -1,5 +1,7 @@ +# syntax=docker/dockerfile:1.4 + # First Stage: Build Proxy service -FROM python:3.13-alpine AS deps +FROM --platform=linux/x86_64 python:3.13-alpine AS deps # Install poetry RUN pip install poetry @@ -8,7 +10,7 @@ RUN pip install poetry COPY pyproject.toml poetry.lock ./ RUN poetry config virtualenvs.in-project true && poetry install --no-root -FROM deps AS runtime +FROM --platform=linux/x86_64 deps AS runtime # Copy virtual env from python-deps stage COPY --from=deps /.venv /.venv @@ -23,17 +25,17 @@ USER appuser # Install application into container COPY app.py __init__.py /home/appuser/app/ +COPY ./specification /home/appuser/app/specification # Copy supervisord configuration COPY supervisord.conf /etc/supervisord.conf -COPY ./specification /home/appuser/app/specification -# Install Prism +# Switch to root and install Prism & Supervisor USER root RUN apk add --no-cache nodejs npm && \ npm install --ignore-scripts -g @stoplight/prism-cli && \ apk add --no-cache supervisor -# Expose ports +# Expose port and start app EXPOSE 9000 ENV UPSTREAM_HOST=http://localhost:5000 # Run supervisord diff --git a/sandbox/Makefile b/sandbox/Makefile index 07e8c68..c9eb6ff 100644 --- a/sandbox/Makefile +++ b/sandbox/Makefile @@ -35,7 +35,7 @@ build-and-publish-sandbox-image: deploy-sandbox-spec: make -C .. construct-spec APIM_ENV=sandbox - proxygen instance deploy sandbox eligibility-signposting-api build/specification/sandbox/eligibility-signposting-api.yaml + proxygen instance deploy sandbox eligibility-signposting-api ../build/specification/sandbox/eligibility-signposting-api.yaml up: build docker compose -f docker-compose.yaml up -d