Skip to content

Commit 7cd5e09

Browse files
linux architecture docker
1 parent 275d101 commit 7cd5e09

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
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

0 commit comments

Comments
 (0)