Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Docker Notes:

Docker pull “image” : pulls image from docker repo

Docker run “image”:

 runs already installed image from docker file system


 if the image is not installed before it is run. Docker will automatically download the image
from the online docker repository (Docker HUB)

Docker run -it “image”: Run image in shell (interactive mode)

Ubantu:

Apt file system - File system where installed/install package modules are found

Apt update – update the File system

Exampe

Apt install node : Installs node by searching it in the file directory

If this command is unable to install node on your computer

Update the file directory using “apt update”.

Apt remove node : remove package

Mkdir: make directory

Touch: create files

Touch file1.txt file2.txt

Mv : move/rename files and dir

Rm: remove files

Rm -r: remove directory (first remove files recursively)

Docker File:

FROM node:alpine

COPY . /app

WORKDIR /app

CMD node app.js


FROM

COPY : Files to be copied from container, and location to store in image

WORKDIR: Default working directory,

CMD: Commands to execute on “docker run ‘image’” command

You might also like