Giter Club home page Giter Club logo

docker-mpc's Introduction

Notes on using Docker

Starting the Docker Daemon

macOS

  1. Install the Docker desktop app (apparently necessary to run the Docker daemon)
brew install --cask docker

The desktop app also provides the docker command-line utility, located at /usr/local/bin/docker.

  1. Run the Docker desktop app

Linux

TBD

Windows

TBD

Building the Image

Run the following command from instide the ubuntu-mpc folder:

docker build --no-cache -t ubuntu-mpc:latest .

Running a Container and Getting a Command Prompt

docker run -it -h my_project --entrypoint /bin/bash ubuntu-mpc:latest

Here, my_project becomes the "host" name while the container is running (useful to remember what prompt we are looking at).

Mounting a Local Folder or Docker Volume

If /local/folder already exists on the user's disk,

docker run -it -h my_project --entrypoint /bin/bash -v local/folder:/var/lib/external-drive ubuntu-mpc:latest

While the container is running, anything written to /var/lib/external-drive will persist and be stored under /local/folder.

A similar effect can be achieved with Docker volumes, which are Docker-specific folders that can be used to hold data related to containers (as opposed to a local folder, that would typically hold data related to the user's host system):

docker volume create mpc-092023-00064  # TE data related to this submission
docker run -it -h my_project --entrypoint /bin/bash -v mpc-092023-00064:/var/lib/external-drive ubuntu-mpc:latest

When the user exits the container, then runs it again, anything written to /var/lib/external-drive is still there, but is not part of the container itself.

docker-mpc's People

Contributors

dpo 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.