Convert Figma logo to code with AI

docker-archive-public logodocker.labs

This is a collection of tutorials for learning how to use Docker with various tools. Contributions welcome.

12,134
5,234
12,134
141

Top Related Projects

71,051

The Moby Project - a collaborative project for the container ecosystem to assemble container-based systems

:warning: This repository is deprecated and will be archived (Docker CE itself is NOT deprecated) see the https://github.com/docker/docker-ce/blob/master/README.md :warning:

An open and reliable container runtime

119,826

Production-Grade Container Scheduling and Management

12,970

CLI tool for spawning and running containers according to the OCI specification

26,830

An open source trusted cloud native registry project that stores, signs, and scans content.

Quick Overview

The docker-archive-public/docker.labs repository is an archived collection of Docker labs and tutorials. It contains various hands-on exercises and examples to help users learn Docker concepts and best practices. The repository is no longer actively maintained but still serves as a valuable resource for Docker enthusiasts and learners.

Pros

  • Comprehensive collection of Docker labs covering various topics
  • Hands-on exercises to reinforce learning
  • Well-structured content with step-by-step instructions
  • Suitable for both beginners and intermediate Docker users

Cons

  • Repository is archived and no longer actively maintained
  • Some content may be outdated due to Docker's rapid evolution
  • Limited coverage of more advanced Docker topics
  • Lack of recent updates to align with the latest Docker features and best practices

Code Examples

As this is not a code library but rather a collection of tutorials and labs, there are no specific code examples to showcase. The repository contains various Docker-related files, such as Dockerfiles and docker-compose.yml files, which are used in the context of the labs and tutorials.

Getting Started

Since this is an archived repository of Docker labs and tutorials, there's no specific installation or setup process. To get started:

  1. Clone the repository:

    git clone https://github.com/docker-archive-public/docker.labs.git
    
  2. Navigate to the cloned directory:

    cd docker.labs
    
  3. Explore the various directories containing different labs and tutorials.

  4. Follow the instructions provided in the README files and lab documents to complete the exercises.

Note that as this repository is archived, it's recommended to use it as a reference and supplement it with more up-to-date Docker resources and documentation.

Competitor Comparisons

71,051

The Moby Project - a collaborative project for the container ecosystem to assemble container-based systems

Pros of Moby

  • Active development with frequent updates and contributions
  • Extensive documentation and community support
  • Core component of Docker, providing essential containerization features

Cons of Moby

  • More complex codebase, potentially harder for beginners to navigate
  • Requires deeper understanding of containerization concepts
  • May include features not needed for simple Docker use cases

Code Comparison

Moby (engine initialization):

func NewDaemon(config *config.Config, registryService registry.Service, containerdRemote libcontainerd.Remote, pluginStore *plugin.Store) (*Daemon, error) {
    if config.Rootless && !rootless.RunningWithRootlessKit() {
        return nil, errors.New("rootless mode needs to run with rootlesskit")
    }
    // ... (additional initialization code)
}

Docker.labs (example Dockerfile):

FROM ubuntu:14.04
RUN apt-get update && apt-get install -y ruby ruby-dev
RUN gem install sinatra
ADD . /opt/webapp
EXPOSE 4567
CMD ["/opt/webapp/bin/webapp"]

Note: Docker.labs is an archived repository containing Docker lab exercises, while Moby is the active, open-source core of Docker. The code comparison shows different aspects: Moby's engine initialization vs. a simple Dockerfile from Docker.labs.

:warning: This repository is deprecated and will be archived (Docker CE itself is NOT deprecated) see the https://github.com/docker/docker-ce/blob/master/README.md :warning:

Pros of docker-ce

  • More comprehensive and actively maintained Docker implementation
  • Includes core Docker engine and CLI components
  • Larger community and ecosystem support

Cons of docker-ce

  • More complex codebase, potentially harder for beginners to navigate
  • Requires more system resources to run and develop
  • May include features not needed for basic Docker usage

Code Comparison

docker-ce:

func (daemon *Daemon) containerStart(container *container.Container, checkpoint string, checkpointDir string, resetRestartManager bool) (err error) {
    container.Lock()
    defer container.Unlock()
    if container.Running {
        return nil
    }
    // ... (additional code)
}

docker.labs:

def run_container(image_name, command):
    client = docker.from_env()
    container = client.containers.run(image_name, command, detach=True)
    return container.id

Summary

docker-ce is a more comprehensive Docker implementation, offering the core engine and CLI components. It has broader community support but may be more complex for beginners. docker.labs appears to be a simpler, educational repository focused on Docker labs and examples. The code comparison shows docker-ce using Go for low-level container management, while docker.labs uses Python for higher-level Docker interactions.

An open and reliable container runtime

Pros of containerd

  • Active development with frequent updates and releases
  • Designed as a standalone container runtime, offering more flexibility
  • Broader industry adoption and support from major cloud providers

Cons of containerd

  • Steeper learning curve for beginners compared to Docker Labs
  • Less comprehensive documentation and tutorials for newcomers
  • Requires additional tools for a complete container ecosystem

Code Comparison

containerd:

import (
    "github.com/containerd/containerd"
    "github.com/containerd/containerd/namespaces"
)

client, err := containerd.New("/run/containerd/containerd.sock")
ctx := namespaces.WithNamespace(context.Background(), "example")

docker.labs:

FROM ubuntu:latest
RUN apt-get update && apt-get install -y nginx
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

The code snippets highlight the different focus of each project. containerd provides a Go API for container management, while docker.labs emphasizes Dockerfile-based container creation and deployment.

containerd is more suitable for advanced users and integrations, offering granular control over container runtimes. docker.labs is better for beginners and educational purposes, providing a simpler interface for container concepts.

Both projects contribute to the container ecosystem, with containerd serving as a foundational runtime and docker.labs offering a learning platform for Docker technologies.

119,826

Production-Grade Container Scheduling and Management

Pros of kubernetes

  • More active development and larger community support
  • Comprehensive container orchestration platform for production environments
  • Extensive documentation and robust ecosystem of tools

Cons of kubernetes

  • Steeper learning curve and more complex setup
  • Higher resource requirements for running a cluster
  • May be overkill for small-scale or simple containerized applications

Code comparison

docker.labs:

FROM ubuntu:14.04
RUN apt-get update && apt-get install -y nginx
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

kubernetes:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
spec:
  replicas: 3
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx:1.14.2
        ports:
        - containerPort: 80

The docker.labs example shows a simple Dockerfile for creating a containerized Nginx server, while the kubernetes example demonstrates a Deployment configuration for managing multiple Nginx containers in a cluster.

12,970

CLI tool for spawning and running containers according to the OCI specification

Pros of runc

  • More actively maintained with frequent updates and contributions
  • Focused on container runtime implementation, providing a standardized approach
  • Part of the Open Container Initiative (OCI), ensuring broader industry support

Cons of runc

  • Narrower scope, focusing primarily on container runtime functionality
  • Steeper learning curve for beginners compared to docker.labs' educational content
  • Less comprehensive documentation for newcomers to container technology

Code Comparison

runc:

func (r *Runc) Create(context context.Context, id, bundle string, opts *CreateOpts) error {
    args := []string{"create", "--bundle", bundle}
    if opts != nil {
        args = append(args, opts.AdditionalArgs...)
    }
    return r.runOrError(r.command(context, append(args, id)...))
}

docker.labs:

def create_container(image, name):
    client = docker.from_env()
    container = client.containers.create(image, name=name)
    return container

Summary

runc is a more specialized tool focused on container runtime implementation, while docker.labs appears to be a broader educational resource for Docker-related topics. runc offers standardization and active development but may be less accessible for beginners. docker.labs likely provides a gentler introduction to container concepts but may not be as up-to-date or comprehensive in terms of runtime specifics.

26,830

An open source trusted cloud native registry project that stores, signs, and scans content.

Pros of Harbor

  • Active development with frequent updates and releases
  • Comprehensive enterprise-grade container registry with advanced features
  • Strong security focus with built-in vulnerability scanning and image signing

Cons of Harbor

  • More complex setup and configuration compared to simpler solutions
  • Requires more resources to run due to its extensive feature set
  • Steeper learning curve for new users

Code Comparison

Harbor (Go):

func (bc *basicController) Prepare() {
    bc.BaseController.Prepare()
    if !config.WithAdmiral {
        if _, ok := bc.Ctx.Input.Session("userId").(int); !ok && !bc.SecurityCtx.IsAuthenticated() {
            bc.Redirect(bc.ConfigURL()+"/login", http.StatusFound)
            return
        }
    }
}

docker.labs (JavaScript):

app.get('/', function(req, res) {
  res.render('home', {
    title: 'Home'
  });
});

Note: The code comparison is limited due to the different nature and scope of these projects. Harbor is a full-featured container registry, while docker.labs appears to be a collection of Docker-related labs and examples.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Docker Tutorials and Labs

At this time we are not actively adding labs to this repository. Our focus is on training.play-with-docker.com where new lab and workshop oriented content is being added. We welcome fixes to existing content. For any new content you wish to contribute, please use this repository:https://github.com/play-with-docker/play-with-docker.github.io.

This repo contains Docker labs and tutorials authored both by Docker, and by members of the community. We welcome contributions and want to grow the repo.

Docker tutorials:

Community tutorials

Contributing

We want to see this repo grow, so if you have a tutorial to submit, or contributions to existing tutorials, please see this guide:

Guide to submitting your own tutorial