Docker Builds for NestJS Apps

Docker Builds for NestJS Apps

When I say a basic Dockerfile. Nestjs is an incredible framework for build backend application for Nodejs developers, using mostly of the common ExpressJS under the hood, and not only that. Docker build for NestJS app. docker build -t makinhs/nestjs-base. Tagged with docker, nestjs, npm, devops.

Another approach to building your own NestJS projects with Docker

What is NestJS?

NestJS is an incredible framework for building backend applications for NodeJS developers, using mostly of the common ExpressJS under the hood, and not only that. The framework is very consolidate and enterprise friendly. If you are interested in seeing more about NestJS, reach out to my article on how to write a  REST API with NestJS

What’s the problem with the Docker build?

When running your application with containers, specially with NodeJS applications, you usually would like to have faster builds that doesn’t consume much memory. A Basic build with NestJS without much care can go easily up to 1gb, and that will consume time in your CI/CD pipeline as well of a lot of waste of memory. If you want a quick solution for that, you can check out my previous article about  docker images for NestJS.

When I say a basic Dockerfile, I mean something like the following:

FROM node:14.15.0-alpine3.10

USER 2000
RUN mkdir -p /home/node/app/node_modules && chown -R 2000:2000 /home/node/app

WORKDIR /home/node/app
COPY --chown=2000:2000 . /home/node/appRUN yarn installRUN yarn build


CMD ["/home/node/app/dist/main.js"]

This would create around ~900mb image.

docker javascript programming nestjs typescript

What is Geek Coin

What is GeekCash, Geek Token

Best Visual Studio Code Themes of 2021

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Object-Oriented Programming with Javascript — using Typescript

Object-Oriented Programming With JavaScript — Using Typescript. TypeScript lets you write JavaScript the way you really want to. TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. TypeScript is pure Object-oriented with classes, interfaces, and statically typed like C# or Java.

What is TypeScript? Why TypeScript? and Why Not TypeScript?

TypeScript extends JavaScript by adding Types. There are many great reasons to switch to TypeScript. Especially if your team uses JavaScript. There are some reasons to not use TypeScript as there are with any language or framework.

Docker Explained: Docker Architecture | Docker Registries

Following the second video about Docker basics, in this video, I explain Docker architecture and explain the different building blocks of the docker engine; docker client, API, Docker Daemon. I also explain what a docker registry is and I finish the video with a demo explaining and illustrating how to use Docker hub.

TypeScript Tutorial For JavaScript Developers - TypeScript Basics

TypeScript Tutorial For JavaScript Developers - TypeScript Basics. I will show you guys 4 example of JavaScript code, and how to convert it to TypeScript. This is a typescript beginners tutorial.

TypeScript: A Superset of JavaScript

Multi-paradigm, Functional, Generic, Imperative, Object-Oriented. In this article, I have shared the essential information about TypeScript programming language. This article contains a basic overview, brief history, features and applications of TypeScript. TypeScript is getting more popular in Full-stack development. In terms of popularity, in the last two years TypeScript pulled ahead of Ruby, Shell, and C.