forked from vercel/og-image
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathDockerfile
41 lines (30 loc) · 1.03 KB
/
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
38
39
40
41
FROM node:12-alpine AS build-env
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build && npm prune --production
FROM gcr.io/distroless/nodejs:12
WORKDIR /app
COPY --from=build-env /app /app
EXPOSE 3000
CMD ["./node_modules/micro/bin/micro.js", "api/dist/index.js"]
ENV \
# Required, see docker-compose.yml
BROWSER_WS_ENDPOINT= \
# Optional
WAIT_UNTIL=networkidle2 \
_=
ARG VCS_REF
ARG BUILD_DATE
LABEL \
org.opencontainers.image.title="screenshotter" \
org.opencontainers.image.description="Screenshot as a Service" \
org.opencontainers.image.url="https://github.com/wei/screenshotter" \
org.opencontainers.image.documentation="https://github.com/wei/screenshotter#readme" \
org.opencontainers.image.source="https://github.com/wei/screenshotter" \
org.opencontainers.image.licenses="MIT" \
org.opencontainers.image.ref.name=$VCS_REF \
org.opencontainers.image.created=$BUILD_DATE \
org.opencontainers.image.authors="Wei He <[email protected]>" \
maintainer="Wei He <[email protected]>"