🦲
mind
  • cleber's mind
  • plans
    • fact checking
    • personal assistant
  • self-management
    • agenda and tasks
    • mails and emails
  • knowledge
    • career
    • programming
      • Big O Notation
      • browsing data
      • C/C++
      • databases
      • eclipse
      • gradle
      • java
        • apache camel
      • javascript
      • naming convention
      • mysql
      • prolog
      • regex
      • REST
      • ssl/tls
      • version control
        • git commands
      • web-semantics
      • wot
    • research
      • mas
      • planning
      • math
        • probability
      • machine learning
      • nlp
      • speech recognition
      • data sources
      • data visualisation
    • it
      • asterisk
      • containers
        • installing docker
        • deploying busybox
        • deploying a sample
        • deploying node-red
        • deploying from the hub
      • clusters
        • installing kubernetes
        • deploying bootcamp
        • deploying nginx
        • deploying jacamo-rest
        • grafana
      • deploy
        • heroku
      • linux
        • tmux
        • vim
        • startup
      • networks
      • pdf
        • ssh
    • productivity
    • language
      • expressions
        • nice signposts
        • linking expressions
      • latex
      • scientific
      • writing
    • sailing
    • financial
      • assets
    • emergency
    • out of boxes
  • teaching
    • eletrônica digital
      • Conversão decimal para binário
      • Conversão binário para decimal
      • Sinais analógicos vs digitais
    • programação I
    • cabeamento estruturado
  • moments
    • insightful ai facts
    • ai4industry-hackathon
    • previous activities
  • brasil
  • external links
    • personal webpage
    • my github
Powered by GitBook
On this page
  • Downloading and running the image
  • Giving a name to the container
  • Exposing ports
  • Stopping the container named static-site

Was this helpful?

  1. knowledge
  2. it
  3. containers

deploying a sample

Deploying a sample containing a static web-site and using nginx web-server

Previousdeploying busyboxNextdeploying node-red

Last updated 5 years ago

Was this helpful?

Following tutorial and a web-server for a simple static web-site example.

Downloading and running the image

  • Running (and downloading if necessary) $ docker run --rm prakhar1989/static-site

  • Running with detached terminal $ docker run -d --rm prakhar1989/static-site

    • To stop this container, execute the command $ docker ps -a to get the container_id and $ docker rm container_id -f (-f to force)

Giving a name to the container

  • Running detached giving a name $ docker run -d --name static-site prakhar1989/static-site

Exposing ports

  • Running and exposing preconfigured ports $ docker run -d -P --name static-site prakhar1989/static-site

  • Show exposed ports $ docker port static-site

  • Forwarding requests of a specific port to a container's internal port $ docker run -p 8888:80 prakhar1989/static-site

    • Browse to should show nginx welcome page

Stopping the container named static-site

  • To stop this container $ docker stop static-site

    • A command to prune containers is necessary to clean the cache

  • To stop this container cleaning the cache $ docker rm static-site -f

docker-curriculum
http://127.0.0.1:8888