-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexpress.dockerfile
More file actions
40 lines (32 loc) · 1.35 KB
/
express.dockerfile
File metadata and controls
40 lines (32 loc) · 1.35 KB
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
FROM node:23-bookworm
# FROM: This keyword is used in Dockerfiles to specify the base
# image you want to use to build your own new image. It is always
# the first instruction in a Dockerfile.
# node:23-bookworm: This is the name of the base image being used.
# node: This indicates the official Node.js image from Docker Hub.
# bookworm: This suggests that the image is built on top of the
# Debian "Bookworm" release. "Bookworm" is a codename for a version
# of the Debian operating system.
# Remember you have to put !/express in the .dockerignore file
# This file is needed in the dspace/epress.dockerfile
# The one here is used when running this on local machine.
# The dspace/express.dockerfile is used when running in the image.
# On local machine, you build with this command:
# docker build -t express -f express.dockerfile .
# And you run:
# docker run -p 3000:3000 express
# I needed to install: brew install tanka
# So I could check the jsonnet file: ???
# RUN apt update; \
# apt install -y --no-install-recommends
# Setting up the work directory in image
WORKDIR /express
# copy from local machine to the image.
COPY ./express/index.js /express/index.js
# These are needed in index.js
RUN npm install express
RUN npm install prom-client
# Exposing server port
EXPOSE 3000
# Starting our application: "node index.js"
CMD [ "node", "index.js" ]