From 7cd5e09aed39eb851271118f43cea09c6a88ddf4 Mon Sep 17 00:00:00 2001 From: karthikeyannhs <174426205+Karthikeyannhs@users.noreply.github.com> Date: Mon, 30 Jun 2025 14:58:55 +0100 Subject: [PATCH 1/2] linux architecture docker --- sandbox/Dockerfile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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 From f2f7fdb02db5dcc87a62e88099e2539118197720 Mon Sep 17 00:00:00 2001 From: karthikeyannhs <174426205+Karthikeyannhs@users.noreply.github.com> Date: Mon, 30 Jun 2025 15:09:21 +0100 Subject: [PATCH 2/2] fix build file loc --- sandbox/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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