-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile_bk
61 lines (38 loc) · 992 Bytes
/
Dockerfile_bk
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
FROM node:22 as builder
WORKDIR /app/medusa
COPY . .
RUN rm -rf node_modules
RUN rm -rf dist
RUN rm -rf .cache
RUN npm install -g npm@latest
RUN npm install --loglevel=error
RUN npm run build
FROM node:22
WORKDIR /app/medusa
RUN mkdir dist
COPY package*.json ./
# COPY develop.sh .
COPY .env .
COPY medusa-config.js .
RUN npm install -g @medusajs/medusa-cli
RUN npm install -g cross-env
RUN npm install
# RUN medusa migrations run
COPY --from=builder /app/medusa/dist ./dist
EXPOSE 9000
ENTRYPOINT ["npm", "run", "start"]
## RUN Docker desktop
##
## Fix error Error: getaddrinfo EAI_AGAIN registry.npmjs.org
## vi /etc/docker/daemon.json
## { "dns": ["8.8.8.8", "8.8.4.4"] }
##
## Migrations
## medusa migrations run
##
## Build:
## docker build . -t <name>
## docker build . -t tstore-be
## Run:
## docker run --name <name container> -p <port local>:<port host>/tcp -d <name image>
## docker run --name tstore-be_container -p 9000:9000/tcp -d tstore-be