Skip to content

Commit

Permalink
Copy/paste pyjs dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
jstvz committed Nov 11, 2024
1 parent 4327e26 commit ac03e2c
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,33 @@
FROM ghcr.io/oddbird/pyjs:py3.9-node22

ARG BUILD_ENV=development
ARG PROD_ASSETS
ARG OMNIOUT_TOKEN
FROM node:22 AS node_base
FROM python:3.9

# Node and npm
COPY --from=node_base /usr/local/lib/node_modules /usr/local/lib/node_modules
COPY --from=node_base /usr/local/bin/node /usr/local/bin/node
COPY --from=node_base /opt/yarn-* /opt/yarn
RUN ln -s /usr/local/lib/node_modules/corepack/dist/corepack.js /usr/local/bin/corepack
RUN ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm
RUN ln -s /usr/local/lib/node_modules/npm/bin/npx-cli.js /usr/local/bin/npx
RUN ln -s /opt/yarn/bin/yarn /usr/local/bin/yarn
RUN ln -s /opt/yarn/bin/yarnpkg /usr/local/bin/yarnpkg
RUN node --version && npm --version && yarn --version

# System setup:
RUN apt-get update \
&& apt-get install -y gettext redis-tools --no-install-recommends \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Python context setup:
RUN pip install --no-cache-dir --upgrade pip pip-tools

# ================ ENVIRONMENT
ENV PYTHONUNBUFFERED 1
ENV PYTHONDONTWRITEBYTECODE 1

WORKDIR /app

# Env setup:
Expand Down

0 comments on commit ac03e2c

Please sign in to comment.