/
Dockerfile
30 lines (24 loc) · 920 Bytes
/
Dockerfile
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
FROM node:21-slim
LABEL maintainer="git@albertyw.com"
EXPOSE 3000
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Set locale
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
RUN apt-get update && apt-get install -y --no-install-recommends \
locales `: Basic-packages` \
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \
&& rm -rf /var/lib/apt/lists/*
# Install dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
curl `: Needed for installing dependencies` \
git `: Needed for sourcemap versioning` \
&& rm -rf /var/lib/apt/lists/*
# Set up directory structures
RUN mkdir -p /var/www/app
COPY . /var/www/app
WORKDIR /var/www/app
# App-specific setup
RUN npm ci --only=production
CMD ["bin/start.sh"]