-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
37 lines (26 loc) · 942 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
31
32
33
34
35
36
37
FROM node:16-slim as base
FROM base as builder
# Create app directory
WORKDIR /usr/src/app
RUN apt-get update \
&& buildDeps="python3 build-essential" \
&& apt-get install -y --no-install-recommends $buildDeps\
&& rm -rf /var/lib/apt/lists/*
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package.json yarn.lock ./
RUN yarn install --prod
# Bundle app source
COPY src src
FROM base
LABEL maintainer="Plone Foundation <[email protected]>" \
org.label-schema.name="blocks-conversion-tool" \
org.label-schema.description="Tool to convert from HTML to Blocks." \
org.label-schema.vendor="Plone Foundation" \
org.label-schema.docker.cmd="docker run -d -p 5000:5000 plone/blocks-conversion-tool:latest"
WORKDIR /usr/src
COPY --from=builder /usr/src/app .
WORKDIR /usr/src/app
EXPOSE 5000
CMD ["yarn", "start"]