You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To minimize the number of steps that a user needs to take to get a scaffolded application to run inside a docker container (and later kubernetes), a new --dockerize flag is needed in the lb4 app command.
A .dockerignore file needs to be created with contents:
node_modules
npm-debug.log
A Dockerfile needs to be created with contents:
FROM node:10.14-alpine
EXPOSE 3000
COPY package.json package.json
RUN npm install
COPY . .
RUN npm run build
CMD ["npm", "start" ]
The port we expose in the Dockerfile would need to be aligned with the value in the index.js file.
The node docker image value , for example: node:10.14-alpine , would have to be a valid/recent docker image for node. The CLI would prompt for these values or offer valid values as default.
Perhaps two helper bash scripts to create a docker image, and run the application in a docker container
(Not sure how much hand-holding we need to do with regards to docker commands. There are several docker commands [list images, delete images, start container, stop container, show container logs]. We need to pick the right balance of helping the user via scripts or via documentation of useful commands)
creates Dockerfile with appropriate EXPOSE value and FROM value
creates .dockerignore
user is able to quickly run the scaffolded application in a Docker container and access the REST application endpoints successfully via browser or curl commands
TBD
The host value needs to change in the index.js for the REST endpoints of the application to be accessible via browser or curl commands. Depends on the outcome of #2350
The text was updated successfully, but these errors were encountered:
Do we also need to entertain Docker Compose? A single YAML file , docker-compose.yml, which defines many different apps (running on docker containers) , and user can start/stop all of them at once using docker-compose up or docker-compose down.
We should align with https://www.cloudnativejs.io/ (IBM runtime's initiative to make Node.js application to be cloud native and it defines conventions for docker/helm/k8s integration).
To minimize the number of steps that a user needs to take to get a scaffolded application to run inside a docker container (and later kubernetes), a new
--dockerize
flag is needed in thelb4 app
command..dockerignore
file needs to be created with contents:Dockerfile
needs to be created with contents:The port we expose in the Dockerfile would need to be aligned with the value in the index.js file.
The node docker image value , for example: node:10.14-alpine , would have to be a valid/recent docker image for node. The CLI would prompt for these values or offer valid values as default.
create a docker image
, andrun the application in a docker container
(Not sure how much hand-holding we need to do with regards to docker commands. There are several docker commands [list images, delete images, start container, stop container, show container logs]. We need to pick the right balance of helping the user via scripts or via documentation of useful commands)
Related to : #1606
Acceptance Criteria
EXPOSE
value andFROM
valueTBD
The host value needs to change in the index.js for the REST endpoints of the application to be accessible via browser or curl commands. Depends on the outcome of #2350
The text was updated successfully, but these errors were encountered: