DEV Community

Discussion on: Docker for front-end developers

Collapse
 
aminnairi profile image
Amin • Edited

Hi there, awesome article. I think DevTO lacks some docker articles!

One thing I like to do when building custom images (and you should too!) is to prefix my homemade images with my username from the Docker website, or from GitHub, or something that you use as a reference on the web.

$ docker build -t aminnairi/react .

While aminnairi is my Docker Hub account username.

That way, I can still use images from the official Docker Hub repository, or from someone else

$ docker pull someoneelse/react # from someone else
$ docker pull react:latest # official, I don't know if they have one but let's imagine

This helps keeping a sort of namespace of images and prevents future conflicts with other similar images.

You can even apply some versioning on your custom images too!

$ docker build -t aminnairi/react:0.1.0 . # initial build
$ docker build -t aminnairi/react:0.2.0 . # look, ma! a new feature!