-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdockerfile
More file actions
51 lines (38 loc) · 1.21 KB
/
dockerfile
File metadata and controls
51 lines (38 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
FROM python:3.12-slim
ENV PYTHONUNBUFFERED=1
#ENV PYTHONDONTWRITEBYTECODE=1
ENV NODE_VERSION=24
SHELL ["/bin/bash", "--login", "-c"]
RUN apt-get update && apt-get install -y --no-install-recommends build-essential
#RUN apt-get install -y nodejs
#RUN apt-get install -y npm
RUN apt-get install curl -y
# Replace shell with bash so we can source files
#RUN rm /bin/sh && ln -s /bin/bash /bin/sh
WORKDIR /app
COPY requirements.txt .
COPY package.json .
COPY package-lock.json .
RUN python -m pip install --upgrade pip
RUN pip install -r requirements.txt
ENV NVM_DIR=/root/.nvm
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh | bash \
&& . ~/.nvm/nvm.sh \
&& nvm install ${NODE_VERSION} \
&& nvm use ${NODE_VERSION} \
&& nvm install-latest-npm \
&& ln -s "$(which node)" /usr/bin/node \
&& ln -s "$(which npm)" /usr/bin/npm
COPY myplugin__define_var.cjs .
COPY Makefile .
COPY eslint.config.mjs .
COPY build.mjs .
COPY browserslistToEsbuild.mjs .
COPY babel.config.json .
COPY .browserslistrc .
COPY static/ ./static/
COPY src/ ./src/
COPY pages/ ./pages/
EXPOSE 8000
ENTRYPOINT ["bash", "-c", "source $NVM_DIR/nvm.sh && make init && exec \"$@\"", "--"]
CMD ["make", "run"]