GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — api/Dockerfile at main · openSenseMap/api

This repository was archived by the owner on Oct 16, 2026. It is now read-only.

Expand file tree

/

Dockerfile

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
44 lines (29 loc) · 1.4 KB
/

Dockerfile

Copy path

File metadata and controls

44 lines (29 loc) · 1.4 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
42
43
44
# Image selected based on https://snyk.io/blog/choosing-the-best-node-js-docker-image/
# Used best practices from https://snyk.io/blog/10-best-practices-to-containerize-nodejs-web-applications-with-docker/
# --------------> The build image
FROM node:18.17.1-bullseye-slim as build
RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends git dumb-init
WORKDIR /usr/src/app
# Copy in main package.json and yarn.lock
COPY package.json /usr/src/app/
COPY yarn.lock /usr/src/app/
# Copy in workspace package.json files
COPY packages/api/package.json /usr/src/app/packages/api/
COPY packages/models/package.json /usr/src/app/packages/models/
RUN yarn install --pure-lockfile --production
COPY . /usr/src/app
RUN yarn create-version-file
# --------------> The production image
FROM node:18.17.1-bullseye-slim
ENV NODE_ENV=production
COPY --from=build /usr/bin/dumb-init /usr/bin/dumb-init
USER node
WORKDIR /usr/src/app
COPY --chown=node:node --from=build /usr/src/app/node_modules /usr/src/app/node_modules
COPY --chown=node:node --from=build /usr/src/app/version.js /usr/src/app/version.js
COPY --chown=node:node . /usr/src/app
# Remove unused files and folders
RUN rm -rf .git .scripts
# Create and change ownership of folder to store uploaded images
RUN mkdir -p /usr/src/app/dist/userimages && chown node:node /usr/src/app/dist/userimages
CMD ["dumb-init", "node", "packages/api/app.js"]
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.