Skip to content

Commit ace7a9e

Browse files
Feature/docker linux x86 (#45)
* linux architecture docker * fix build file loc
1 parent 275d101 commit ace7a9e

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

sandbox/Dockerfile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
# syntax=docker/dockerfile:1.4
2+
13
# First Stage: Build Proxy service
2-
FROM python:3.13-alpine AS deps
4+
FROM --platform=linux/x86_64 python:3.13-alpine AS deps
35

46
# Install poetry
57
RUN pip install poetry
@@ -8,7 +10,7 @@ RUN pip install poetry
810
COPY pyproject.toml poetry.lock ./
911
RUN poetry config virtualenvs.in-project true && poetry install --no-root
1012

11-
FROM deps AS runtime
13+
FROM --platform=linux/x86_64 deps AS runtime
1214

1315
# Copy virtual env from python-deps stage
1416
COPY --from=deps /.venv /.venv
@@ -23,17 +25,17 @@ USER appuser
2325

2426
# Install application into container
2527
COPY app.py __init__.py /home/appuser/app/
28+
COPY ./specification /home/appuser/app/specification
2629
# Copy supervisord configuration
2730
COPY supervisord.conf /etc/supervisord.conf
2831

29-
COPY ./specification /home/appuser/app/specification
30-
# Install Prism
32+
# Switch to root and install Prism & Supervisor
3133
USER root
3234
RUN apk add --no-cache nodejs npm && \
3335
npm install --ignore-scripts -g @stoplight/prism-cli && \
3436
apk add --no-cache supervisor
3537

36-
# Expose ports
38+
# Expose port and start app
3739
EXPOSE 9000
3840
ENV UPSTREAM_HOST=http://localhost:5000
3941
# Run supervisord

sandbox/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ build-and-publish-sandbox-image:
3535

3636
deploy-sandbox-spec:
3737
make -C .. construct-spec APIM_ENV=sandbox
38-
proxygen instance deploy sandbox eligibility-signposting-api build/specification/sandbox/eligibility-signposting-api.yaml
38+
proxygen instance deploy sandbox eligibility-signposting-api ../build/specification/sandbox/eligibility-signposting-api.yaml
3939

4040
up: build
4141
docker compose -f docker-compose.yaml up -d

0 commit comments

Comments
 (0)