Giter Club home page Giter Club logo

docker-artifacts's Introduction

Docker Artifacts

This is a partial guide to creating artifacts using Docker.

A rough, brief introduction to Docker

To a first approximation, a Docker container is a lightweight virtual machine that only virtualizes userspace; its OS is the host OS. But it contains its own separate filesystem, its own separate process table, its own network ports, etc. In practice, Docker containers are usually specialized to run one (or at most a few) primary applications rather than being a general-purpose platform that can run any sort of application.

A Docker image is a recipe for initializing a container. It describes the initial contents of the filesystem and a command to run when the container is created (for example, a shell or server). Images are built in reusable layers. For example, an image for an Apache web server might be built with a base (minimal) Linux userspace layer, then a layer containing the Apache software. An image for a Cassandra database server might share the same base Linux userspace layer, then have a layer with the Java JDK, then another layer with the Cassandra software (scripts and jar files).

To build your own image, you should start with a suitable image and then add a layer containing your specific content. You must write a Dockerfile that specifies the starting image and the content to add.

General resources:


Docker commands

docker build -t artifact .

docker run --rm -it artifact
docker run --rm -it -v artifact-shared:/app/shared artifact

docker volume inspect artifact-shared  # shows Mountpoint on host filesystem
docker volume ls
docker volume rm artifact-shared

docker ps -a
docker container prune

docker image ls
docker inspect artifact

docker image save -o artifact.tar artifact
docker image load -i artifact.tar

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.