generated from wabarc/project-template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
28 lines (18 loc) · 615 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
# Copyright 2023 Wayback Archiver. All rights reserved.
# Use of this source code is governed by the MIT
# license that can be found in the LICENSE file.
FROM node:18-alpine as builder
#RUN wget -O- https://gobinaries.com/tj/node-prune | sh
WORKDIR /app
ADD . /app/
RUN yarn install && yarn build
# Remove development dependencies
RUN npm prune --production
RUN yarn autoclean
FROM node:18-alpine
WORKDIR /app
# Copy binary from builder
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/dist ./dist
RUN chmod +x /app/dist/cli.js
RUN ln -s /app/dist/cli.js /usr/local/bin/cairn