-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
37 lines (28 loc) · 978 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
# This is our runtime container that will end up
# running on the device.
FROM --platform=linux/amd64 node:alpine AS build_amd64
#FROM --platform=linux/arm64 node:alpine AS build_arm64
#FROM --platform=$BUILDPLATFORM node:alpine AS builder
# TARGETPLATFORM
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM" > /log
# Mounting point for data
RUN mkdir -p /home/node/okapi/data
# Create app directory, all program files will be here
# (data (content) files will be mounted later)
WORKDIR /usr/local/bin/okapi
# 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 ./
RUN npm install
# If you are building your code for production
# RUN npm ci --only=production
# Bundle app source
COPY src/ src/
COPY local*.yml ./
ENV VERSION=1.2.4
ENV DATA_PATH=/home/node/okapi/data
EXPOSE 8080
CMD [ "node", "src/index.js" ]