Skip to content

Commit

Permalink
Fix unknown arch in manifests
Browse files Browse the repository at this point in the history
  • Loading branch information
khvn26 committed Jun 20, 2024
1 parent 1fa43a6 commit df9b783
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ ARG CI_COMMIT_SHA=dev

# - Intermediary stages
# * build-node
FROM node:16 AS build-node
FROM --platform=$TARGETPLATFORM node:16 AS build-node

# Copy the files required to install npm packages
WORKDIR /app
Expand All @@ -66,25 +66,25 @@ RUN cd frontend && ENV=${ENV} npm ci --quiet --production
COPY frontend /app/frontend

# * build-node-django [build-node]
FROM build-node as build-node-django
FROM --platform=$TARGETPLATFORM build-node as build-node-django

RUN mkdir /app/api && cd frontend && npm run bundledjango

# * build-node-selfhosted [build-node]
FROM build-node as build-node-selfhosted
FROM --platform=$TARGETPLATFORM build-node as build-node-selfhosted

RUN cd frontend && npm run bundle

# * build-python
FROM python:3.11 as build-python
FROM --platform=$TARGETPLATFORM python:3.11 as build-python
WORKDIR /app

COPY api/pyproject.toml api/poetry.lock api/Makefile ./
ENV POETRY_VIRTUALENVS_CREATE=false POETRY_HOME=/usr/local
RUN make install opts='--without dev'

# * build-python-private [build-python]
FROM build-python AS build-python-private
FROM --platform=$TARGETPLATFORM build-python AS build-python-private

# Authenticate git with token, install SAML binary dependency,
# private Python dependencies, and integrate private modules
Expand All @@ -98,7 +98,7 @@ RUN --mount=type=secret,id=github_private_cloud_token \
make install-private-modules

# * api-runtime
FROM python:3.11-slim as api-runtime
FROM --platform=$TARGETPLATFORM python:3.11-slim as api-runtime

WORKDIR /app

Expand All @@ -119,7 +119,7 @@ CMD ["migrate-and-serve"]

# - Target (shippable) stages
# * private-cloud-api [api-runtime, build-python-private]
FROM api-runtime as private-cloud-api
FROM --platform=$TARGETPLATFORM api-runtime as private-cloud-api

COPY --from=build-python-private /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages
COPY --from=build-python-private /usr/local/bin /usr/local/bin
Expand All @@ -130,7 +130,7 @@ RUN touch ./ENTERPRISE_VERSION
USER nobody

# * private-cloud-unified [api-runtime, build-python-private, build-node-django]
FROM api-runtime as private-cloud-unified
FROM --platform=$TARGETPLATFORM api-runtime as private-cloud-unified

COPY --from=build-node-django /app/api/static /app/static
COPY --from=build-node-django /app/api/app/templates/webpack /app/app/templates/webpack
Expand All @@ -143,7 +143,7 @@ RUN touch ./ENTERPRISE_VERSION
USER nobody

# * saas-api [api-runtime, build-python-private]
FROM api-runtime as saas-api
FROM --platform=$TARGETPLATFORM api-runtime as saas-api

# Install GnuPG and import private key
RUN --mount=type=secret,id=sse_pgp_pkey \
Expand All @@ -161,7 +161,7 @@ RUN touch ./SAAS_DEPLOYMENT
USER nobody

# * oss-api [api-runtime, build-python]
FROM api-runtime as oss-api
FROM --platform=$TARGETPLATFORM api-runtime as oss-api

COPY --from=build-python /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages
COPY --from=build-python /usr/local/bin /usr/local/bin
Expand All @@ -171,7 +171,7 @@ RUN python manage.py collectstatic --no-input
USER nobody

# * oss-frontend [build-node-selfhosted]
FROM node:16-slim AS oss-frontend
FROM --platform=$TARGETPLATFORM node:16-slim AS oss-frontend

USER node
WORKDIR /srv/bt
Expand All @@ -187,7 +187,7 @@ EXPOSE 8080
CMD ["node", "./api/index.js"]

# * oss-unified [build-python, build-node-django]
FROM api-runtime as oss-unified
FROM --platform=$TARGETPLATFORM api-runtime as oss-unified

COPY --from=build-node-django /app/api/static /app/static/
COPY --from=build-node-django /app/api/app/templates/webpack /app/app/templates/webpack
Expand Down

0 comments on commit df9b783

Please sign in to comment.