Dockerizing egg.js
- Dominant language
- TypeScript
- Stars
- 19k
- Forks
- 1.8k
- PR merge metrics
- No merged PRs in 30d
Description
Is the following steps enough to Dockerizing egg.js application?
#### Removing `--daemon` in the start script in the `package.json`
```json
"scripts": {
"start": "egg-scripts start --title=egg-server-app",
},
```
#### Using the following docker file
```dockerfile
FROM node:16
# Create app directory
WORKDIR /usr/src/app
# 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 . .
EXPOSE 80
CMD [ "npm", "run" , "start" ]
```
I am asking about `CMD [ "npm", "run" , "start" ]` part
Contributor guide
Assessment
This issue has not been assessed yet.