nodeshift / nodeshift/nodeshift

Docker Build - Create a default Docker file if there is not one

Open
#444 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted
Dominant language
JavaScript
Stars
89
Forks
30
PR merge metrics
No merged PRs in 30d

Description

If someone is using the --build.strategy=Docker flag, nodeshift will expect that they have supplied a Dockerfile with their source code.

It might be a nice feature to generate a very basic Dockerfile if they don't have one. We could base it off of this Dockerfile, which is how the Nodejs.org "dockerize a node app" article does it

We will need to determine what node image to default to. Most likely we could default to the s2i image we already default to, and the --dockerImage and --dockerTag flags could be used to overwrite that value and use any node.js docker image/tag

Do we also add the ability for someone to overwrite what the Dockerfile CMD does? I think the link i shared above uses server.js, but a user might want to change that. or at that point, do they create their own Dockerfile?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the --build.strategy=Docker path and how --dockerImage and --dockerTag are currently handled. Review the referenced basic-node-app-dockerized Dockerfile, then define the default image, generated Dockerfile contents, and whether the CMD is configurable; done means Docker builds work when no Dockerfile is supplied.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, javascript, node.js
Domain
build-system, cli, devops
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.