GithubHelp home page GithubHelp logo

rafaeldasilvaperes / docker-learning Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 14 KB

A repository to save my progress into learning Docker where I will upload some of my images.

JavaScript 69.55% Dockerfile 30.45%

docker-learning's Introduction

Learning Docker from the basics!

This repository will be updated with my progress into the Container's World!



Useful commands (used so far)

  • docker ps

    • shows running containers;

  • docker ps -a

    • shows all containers;

  • docker images

    • shows all images (running and stopped);

  • docker tag [imageID] [giveItAName]

    • naming an already built image;

  • docker tag [imageID] [giveItAName]:[butAlsoATag]

    • giving an already existing image a name and a tag;

  • docker build [PATH]

    • if the Dockerfile with your image settings is located in the same path you are, you can use . , else use a path;

  • docker build -t [giveItAName] [PATH]

    • Flag -t (tag) lets you name your image when you are building it;

  • docker build -t [giveItAName]:[butAlsoATag] [PATH]

    • you can not just name it while building it, but also TAG it;

  • docker run [image]

    • creates and starts a new container;

  • docker run -d [image]

    • flag -d (detached) runs a new container without holding the terminal;

  • docker run -p [imagePORT:appPORT] [image]

    • flag -p (port) specifies the port the container will be running. You access localhost:imagePORT and it uses the port you made available in your app;

  • docker run -d -p [imagePORT:appPORT] [image]

    • a combination of the two last commands. It runs an image on a new container on specific port with a free terminal;

  • docker run -d -p [imagePORT:appPORT] --name [giveItAName] [image]

    • you can give a name to your container when creating it. Names should be unique, as IDs;

  • docker stop [container]

    • used to stop the specific container running, use container's ID or its name to stop it;

  • docker start [container]

    • after stopping a container, you can always start it again;

  • docker start -i [container]

    • You can always see your logs or interactively pass commands on the terminal with your --interactive flag;

docker-learning's People

Contributors

rafaeldasilvaperes avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.