forked from scratchfoundation/scratch-editor
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
62 lines (53 loc) · 1.61 KB
/
Copy pathDockerfile
File metadata and controls
62 lines (53 loc) · 1.61 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
52
53
54
55
56
57
58
59
60
61
62
FROM node:24-bookworm-slim
LABEL maintainer="Kouji Takao"
ENV LANG=C.UTF-8
ENV DEBIAN_FRONTEND=noninteractive
RUN \
set -eux \
&& apt update \
&& apt install -y --no-install-recommends \
build-essential \
ca-certificates \
git \
curl \
chromium \
chromium-driver \
libgl1-mesa-dri \
libglapi-mesa \
libosmesa6 \
fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1
# Development convenience tools (separate layer to avoid busting app build cache)
RUN \
set -eux \
&& apt install -y --no-install-recommends \
iputils-ping \
jq \
less \
lsof \
lv \
netcat-openbsd \
openssh-client \
procps \
tmux \
vim
# AWS CLI v2 — needed to deploy the CDK infra projects (infra/*) from inside
# the container. CDK itself comes from each project's npm devDependencies, but
# the aws CLI is not an npm package so it is installed here for reproducibility.
RUN \
set -eux \
&& apt install -y --no-install-recommends unzip \
&& curl -fsSL "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m).zip" -o /tmp/awscliv2.zip \
&& unzip -q /tmp/awscliv2.zip -d /tmp \
&& /tmp/aws/install \
&& rm -rf /tmp/aws /tmp/awscliv2.zip \
&& aws --version
# Install Playwright and its dependencies
RUN npx playwright install chromium --with-deps
# Link chromium to google-chrome just in case
RUN ln -s /usr/bin/chromium /usr/bin/google-chrome
ENV NODE_OPTIONS="--max-old-space-size=4000"
EXPOSE 8601
COPY entrypoint.sh /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh
ENTRYPOINT ["/app/entrypoint.sh"]
CMD ["npm", "start"]