Author: Mr.ParottaSalna
-
Antipatterns while using docker containers
During my docker learning journey, while i was going through many blogs, tutorials, conference videos; most of them were mentioning about some of the anti-patterns. I would like to collate all the items which i have been learning and will be learning. A. Data or Logs in Container. Containers are ideal for stateless applications and…
-
Can we build image on the FLY and USE IT ?
This is somewhat similar to antipattern, but goes beyond just doing a git clone directly into an image. This involves cloning, building, and then running the newly created image without ever pushing the image to an intermediary Docker registry. This is an antipattern for several reasons. First off, pushing the image to a registry gives…
-
Code Smell 2 – Magic Numbers
Introduction A Magic Number is a hard-coded value that may change at a later stage, but that can be therefore hard to update. It’s a numeric value that’s encountered in the source but has no obvious meaning. Yet more difficulties arise when you need to change this magic number. Find and replace won’t work for…
-
Will –no-cache-dir in pip helps in reducing size of docker image ?
Problem Faced: I was trying to reduce the docker size of a python application. In those one of the methods, i was struck by an idea of remove pip caching. So was trying to reduce the size of the docker image in total. What is pip caching ? As per docs, When making any HTTP request,…
-
Docker Cookbook
If the container started with -d or -i then Ctrl C Dockerfile for a simple flask/python application ? docker build –build-arg DOCKER_ENV=stag -t test-node . You will see at layer —> Running in a6231eca4d0b your NODE_ENV for stage is stag When you run this docker container and run this command your output will be