-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
35 lines (29 loc) · 1022 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
# Build the application
# -> transpile typescript to javascript
FROM node:lts AS builder
WORKDIR /usr/src/app
COPY package.json ./
COPY tsconfig.json ./
COPY yarn.lock ./
COPY ./app ./app
RUN yarn install ; yarn build
# Application runner
# -> runs the transpiled code itself
# seperated from builder context to keep image as slim as possible
FROM node:lts
WORKDIR /app
ENV NODE_ENV=production
COPY package.json ./
COPY yarn.lock ./
RUN yarn install --only=production
COPY --from=builder /usr/src/app/dist/app ./app
EXPOSE 3000
CMD [ "node", "app/launch.js" ]
LABEL \
org.opencontainers.image.vendor="IntellectualSites" \
org.opencontainers.image.title="Arkitektonika" \
org.opencontainers.image.description="A REST repository for NBT data for Minecraft" \
org.opencontainers.image.url="https://github.com/IntellectualSites" \
org.opencontainers.image.source="https://github.com/IntellectualSites/Arkitektonika" \
org.opencontainers.image.licenses="ISC" \
com.docker.image.source.entrypoint=Dockerfile