-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathContainerfile
More file actions
31 lines (23 loc) · 778 Bytes
/
Copy pathContainerfile
File metadata and controls
31 lines (23 loc) · 778 Bytes
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
FROM docker.io/node:bookworm AS prettier-install
RUN npm install -g yarn \
&& yarn add prettier@3
FROM python:3.11-slim-bookworm
ARG LOCAL_BIN=/root/.local/bin
ENV PATH=$LOCAL_BIN:$PATH
# Install prettier
RUN mkdir -p $LOCAL_BIN
COPY --from=prettier-install /usr/local/bin/node $LOCAL_BIN
COPY --from=prettier-install /node_modules/prettier /prettier
RUN ln -s /prettier/bin/prettier.cjs $LOCAL_BIN/prettier
COPY . /working/
WORKDIR /working
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -yq --no-install-recommends curl make \
&& curl -sSL https://install.python-poetry.org | python3 - \
&& poetry install \
&& rm -rf /tmp/* \
&& rm -rf /var/cache/apt/* \
&& rm -rf /var/tmp/*
ENTRYPOINT ["poetry", "run"]
CMD ["bash"]