GithubHelp home page GithubHelp logo

collabnix / dockerlabs Goto Github PK

View Code? Open in Web Editor NEW
7.0K 210.0 2.0K 169.58 MB

Docker - Beginners | Intermediate | Advanced

Home Page: https://dockerlabs.collabnix.com

License: Apache License 2.0

Dockerfile 0.11% PHP 56.42% CSS 11.83% JavaScript 14.78% Shell 0.28% HCL 0.01% PowerShell 0.03% HTML 7.42% Ruby 7.19% Roff 0.20% Python 0.05% C# 0.03% Java 0.02% Go 0.01% SCSS 0.65% Slim 1.00% Objective-J 0.01%
docker beginners intermediate advance dockerfile dockernetworking dockerstorage kubernetes dockerenteprise hacktoberfest

dockerlabs's Introduction

πŸ—οΈ Getting Started with Docker

stars Discord GitHub contributors Twitter

My image

  • A $0 Learning Platform for All Levels - from the ground Up
  • Over 500+ Highly Interactive Docker Tutorials and Guides
  • Well tested on Docker Desktop and can be run on Browser (no Infrastructure required)

πŸ“ Join our Community

Featured Blog Posts and Articles

πŸ“Œ Workshop/Labs (Hands-On Practical Labs)

Title Topics Covered Labs
Getting Started Why, What & How about Docker?(slides) -
Docker Core Concepts Concepts of Docker Image, Containers, Multi-container apps -
Docker for Beginner Docker Image, Container, Dockerfile, Volumes, Networking 40
Docker for Intermediate Docker Compose, Swarm, Advanced Networking 50
Docker for Advanced Docker Security, Content Trust, Image Scanning, Swarm Mode Security 31
Docker Desktop Docker Dashboard, Dev Environments, Extensions 5

Latest Docker Desktop Features and Demos

Title Topics Covered Category Labs
Docker Scout Scout CLI, Scout Sample Demo Security 2
Docker Extensions Docker Extensions Development Tools 1
Docker init Dockerfile, Compose, Python, Go, Rust, Node Developer Tools 5
Docker init for Python Dockerfile, Compose, Python Developer Tools 1
Docker init for Go Dockerfile, Compose, Go Developer Tools 1
Docker init for Rust Dockerfile, Compose, Rust Developer Tools 1
Docker init for ASP.NET Dockerfile, Compose, .NET Developer Tools 1
Docker init for PHP Dockerfile, Compose, PHP Developer Tools 1
Compose Watch Compose, Sync, Rebuild Developer Tools 1
Compose Include Compose, Include Developer Tools 1
Compose Profile Compose, Profile, Staging, Prod Developer Tools 1

Industry Use cases

Title Topics Covered Labs
Docker for AI Docker for Data Scientist 1
Docker for Leading IDEs Developer IDEs Not Started
Docker for Financial Service - Not Started
Docker for Healthcare - Not Started

Containerd Blogs & Resources

Title Topics Covered Labs
What is Containerd and what problems does it solve - Not Started
Containerd and Kubernetes - Not Started
How To Run Containerd On Docker Desktop - Not Started
Getting Started With Containerd 2.0 - Not Started
Containerd Vs Docker: What’s the difference? - Not Started

Docker WorkShop for Beginners

Pre-requisite:

Getting Started with Docker Image

Accessing & Managing Docker Container

Getting Started with Dockerfile

Creating Private Docker Registry

Docker Volumes

Docker Networking

Docker Workshop for Intermediate Users

Docker Compose

Docker Swarm

Introduction to Docker Swarm

Docker Services | Scaling | Draining Node | Rescheduling Containers

Docker Networking - II

Overlay Networking

Implementing MacVLAN

Docker Workshop for Advance Users

Docker Security101

Docker Content Trust

Docker Secrets Management

Docker Secret Management with UCP

Docker Network Security

Security Scanning

Swarm Mode Security

πŸ”₯ Concepts and Terminologies (Beginners to Advance)

πŸ—ƒοΈ Sample App

We recommend you to visit Docker Awesome Compose Repository in order to find the Compose files for running sample apps

Web Framework

Python/Django
Docker + Django + PostgreSQL
Python + Flask + Redis

Reactjs
React + Spring + MySQL
React + Express + MySQL
React + Express + MongoDB
React + Rust + PostgreSQL
React + Nginx

Golang
Go + NGINX + MySQL
Go + NGINX + PostgreSQL
Docker + Gomodule

Java / Spring Boot
Spring + PostgreSQL
Java Spark + MySQL

Database

PostgreSQL
Docker + Django + PostgreSQL

MongoDB
NGINX + Flask + MongoDB
NodeJS + MongoDB

MySQL
NGINX + ASP.NET + MySQL`

Monitoring

Prometheus
Docker + Prometheus Stack + Docker Swarm

Logging

Elastic
Docker + Elasticsearch + Logstash + Kibana + Docker Swarm
Elasticsearch + Logstash + Kibana

Testing Tools

Apache JMeter
Docker + Apache Jmeter + Docker Swarm Mode

Networking

MacVLAN
Docker + MacVLAN
Docker + Docker Compose & IPv6

Security

Docker Security
Introduction to Docker Security
Running Containers as ROOT

Docker Scout Resources and Links

This is a curated list of Docker Scout related resources. It is not an official list, but a community effort to help people find the best stuff for Docker Scout in 2023 and beyond.

Scout Blogs

Scout Tutorials

GitHub Sample projects for Scout

Scout Case Studies

Scout Featured Videos

Docker Scout: Securing The Complete Software Supply Chain (DockerCon 2023) Cut Through Vulnerability Noise with Runtime Insights (DockerCon 2023)
Docker Scout Docker Scout
Docker Scout: Live Demo, Insights, and Q&A Vulnerability Scanning and Reporting
Docker Scout Vulnerability Scanning and Reporting
Find Vulnerabilities Fast! New Docker CLI Command Adding the docker scout feature to the Docker CLI
Docker Scout Docker Scout
How to scan Container image using Docker Scout Docker Scout Tutorial: Docker scanning
Docker Scout Docker Scout
TECHarlas #3 - Supply chain, Docker Scout y seguridad en contenedores con Felipe Cruz de @DockerIo
Docker Scout

πŸ‘₯ Governance

Dockerlabs is an independent community project founded by Ajeet Singh Raina, a Docker Captain from India & Docker Community Leader which is now being built & shaped by a growing community of contributors across the globe.

Core Contributors

Ajeet Singh Raina
Ajeet Singh Raina

Sangam Biradar
Sangam Biradar

Savio Mathew
Savio Mathew

Saiyam Pathak
Saiyam Pathak

Apurva Bhandari
Apurva Bhandari

Sarkar Tathagata
Sarkar Tathagata

Prashansa K
Prashansa K

Wikitops
Wikitops

Akshit Grover
Akshit Grover

Ameya Agashe
Ameya Agashe

Bala
Bala

πŸš€ How to Contribute

Thank you so much for showing your interest in contributing to Dockerlabs tutorials.

Guide to submitting your own tutorial
Template for writing Tutorial Page

License

Apache License 2.0

Proceed to Beginners Track >>

dockerlabs's People

Contributors

adesoji1 avatar ajeetraina avatar akshitgrover avatar aliabbask08 avatar amitatha82 avatar apurvabhandari avatar balasu avatar becktimothy avatar collabnix avatar dependabot[bot] avatar divyajeet-singh avatar dockerworxinc avatar gauravgahlot avatar gowth4m avatar gowthamsundar avatar karanveersingh5623 avatar khushiyant avatar mohan08p avatar mrutpati avatar openusm avatar pradhans0906 avatar prashansa-k avatar rachitmehrotra avatar rahulsurwade08 avatar sagar2366 avatar saiyam1814 avatar sangam14 avatar saviovettoor avatar shefalibisht00 avatar wikitops avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dockerlabs's Issues

Slack join link is expired

Describe the bug
It seems that the Slack join link is expired. I cannot find a way to join the slack.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://dockerlabs.collabnix.com/kubernetes/kubetools/
  2. Click on the "Join Slack" button
  3. See the error message: "The link is no longer active" (see the below screenshot)

Expected behavior
I can see the webpage to register the account.

Screenshots
Screenshot from 2020-11-22 12-10-37

Additional context

Building a Private Docker Registry Failing Due to Permissions Error and Requires `REGISTRY_HTTP_HOST` flag

Local host registry permissions failing as per documentation instructions

To Reproduce
Steps to reproduce the behavior:

  1. Start the container as per instructions
  2. Below error is produced when attempting to push to local registry and continuously loops until HTTP 500 server failure
$ docker run -d \
  -p 5000:5000 \
  --name registry \
  -v /registry/data:/var/lib/registry \
  --restart always \
  registry:2

$ docker push  localhost:5000/alpine:3.6
The push refers to repository [localhost:5000/alpine]
<CONTAINER-ID>: Retrying in 1 second **<---- Continuous loop**

Expected behavior
Push of container to local repo should be successful first time

Screenshots
NA. see code snippets

Desktop (please complete the following information):

  • MAC OS Ventura 13.1
  • Docker version 20.10.22, build 3a2c30b

Additional context
Issue is resolved by adding REGISTRY_HTTP_HOST flag which sets correct working permissions and is successful

$ docker run -e REGISTRY_HTTP_HOST=localhost:50001 -d -p 5001:5000 --name registry registry:2

The push refers to repository [localhost:5001/alpine]
721384ec99e5: Pushed

Trying to get in touch regarding a security issue

Hey there!

I'd like to report a security issue but cannot find contact instructions on your repository.

If not a hassle, might you kindly add a SECURITY.md file with an email, or another contact method? GitHub recommends this best practice to ensure security issues are responsibly disclosed, and it would serve as a simple instruction for security researchers in the future.

Thank you for your consideration, and I look forward to hearing from you!

(cc @huntr-helper)

SHELL page doesn't show how to use SHELL

Describe the bug
SHELL page doesn't show how to use the SHELL instruction

To Reproduce
Steps to reproduce the behavior:

  1. Go to SHELL page
  2. Look at the code blocks (Dockerfile contents)

Expected behavior
SHELL instruction should've been used somewhere

[docker] Upgrade labs for cross-platform compatibility

Describe the bug
When running examples/labs for the docker workshop locally people will find that some Dockerfiles won't build because they are targeting a specific arch different than the one the user is running the docker daemon.

I have seen a lot of Dockerfiles targetting, for eg, alpine:3.5 as the base image which is amd64 specific
If you run the build in an arm64v8 arch like myself which I have a Mac you might encounter this compatibility error.

To Reproduce
Steps to reproduce the behavior:

  1. Check that your running architecture differs from amd64
uname -m // arm64
  1. Try to build this testing Dockerfile
FROM alpine:3.5
CMD ["/bin/echo", "Works!"]
docker build -t try .
  1. See error
[+] Building 1.1s (3/3) FINISHED                                                                                  docker:desktop-linux
 => [internal] load build definition from Dockerfile                                                                              0.0s
 => => transferring dockerfile: 79B                                                                                               0.0s
 => [internal] load .dockerignore                                                                                                 0.0s
 => => transferring context: 2B                                                                                                   0.0s
 => ERROR [internal] load metadata for docker.io/library/alpine:3.5                                                               1.0s
------
 > [internal] load metadata for docker.io/library/alpine:3.5:
------
Dockerfile:1
--------------------
   1 | >>> FROM alpine:3.5
   2 |     CMD ["/bin/echo","Works!"]
--------------------
ERROR: failed to solve: alpine:3.5: no match for platform in manifest sha256:66952b313e51c3bd1987d7c4ddf5dba9bc0fb6e524eed2448fa660246b3e76ec: not found

Expected behavior
Build should be possible with more archs different than amd64.
There are some images that are multi-arch in the alpine official repo for the case and for the many other OS base-image repos that are used in the workshop.

Proposed solution

For alpine references please use instead apline:3 that targets to alpine:latest which is compatible with 386, amd64 and arm architectures. Proves to work well in my arm64v8 Mac.

Desktop (please complete the following information):

  • OS: uname -a
    Darwin Demians-MacBook-Pro.local 22.5.0 Darwin Kernel Version 22.5.0: Thu Jun 8 22:22:20 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T6000 arm64

Kudos to the creator and contributors of this wonderful workshop!

ONBUILD page doesn't show how to use ONBUILD

Describe the bug
ONBUILD page doesn't show how to use the ONBUILD command?

To Reproduce
Steps to reproduce the behavior:

  1. Go to ONBUILD page
  2. Look at the code blocks (Dockerfile contents)

Expected behavior
ONBUILD command should've been used somewhere

[DockerLab] no matches for kind "Deployment" in version "apps/v1beta2"

Describe the bug
In DockerLab excercice Deployment 101, creating a deployment returns following error :
error: unable to recognize "nginx-dep.yaml": no matches for kind "Deployment" in version "apps/v1beta2"

To Reproduce
Steps to reproduce the behavior:

  1. go to dockerlabs/kubernetes/workshop/Deployment101
  2. run "kubectl create -f nginx-dep.yaml"
  3. See error

Expected behavior
deployment.apps/nginx-deployment should be created

docs: Capabilities page - Images can store file-based capabilities

https://dockerlabs.collabnix.com/advanced/security/capabilities/

Docker imposes certain limitations that make working with capabilities much simpler. For example, file capabilities are stored within a file's extended attributes, and extended attributes are stripped out when Docker images are built. This means you will not normally have to concern yourself too much with file capabilities in containers.

Docker images cannot have files with capability bits set. This reduces the risk of Docker containers using capabilities to escalate privileges. However, it is possible to mount volumes that contain files with capability bits set into containers. Therefore you should use caution if doing this.

These are inaccurate. The limitation was removed with BuildKit / buildx IIRC which has been the default image builder since Docker 23 (released Feb 2023), which can preserve extended file attributes.

I believe the main issue prior was that you'd lose the extended attributes via a COPY but they would otherwise remain intact so long as the image layer was on a file system that supported the file attributes? (I recall an issue with AUFS, which may still be problematic for some NAS systems)

[Bug reporting] XSS vulnerabilty in wp_kses_bad_protocol in wp-includes/kses.php (CVE-2019-20041)

Hi

Our research team in KAIST WSP Lab found a known XSS vulnerability in the recent version of dockerlabs.
In particular, the bug we report is a known bug by CVE-2019-20041.

wp_kses_bad_protocol in wp-includes/kses.php in WordPress before 5.3.1 mishandles the HTML5 colon named entity, allowing attackers to bypass input sanitization, as demonstrated by the javascript: substring.

Please check this line.

Thanks!

update error

On my Jetson Nano

after enter
curl -sSL https://get.docker.com/ | sh

and it shows the error like

E: The repository 'https://nvidia.github.io/libnvidia-container/ubuntu18.04/arm64 Release' does not have a Release file.
E: The repository 'https://nvidia.github.io/nvidia-container-runtime/ubuntu18.04/arm64 Release' does not have a Release file.
E: The repository 'https://nvidia.github.io/nvidia-docker/ubuntu18.04/arm64 Release' does not have a Release file.

How to solve it? Thanks so much

update bot

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Add Discord Channel

As Collabnix has discord channel, it would be great to have the following entry in _layouts/index.html:

<h3> Join Collabnix Discord Channel </h3>
        
       <iframe src="https://discordapp.com/widget?id=1020180904129335379&theme=dark" width="350" height="500" allowtransparency="true" frameborder="0"></iframe>

Error: context deadline exceeded

While executing command : ETCDCTL_API=3 etcdctl member list --endpoints=https://192.168.1.11:2379 --cacert=ca.pem --cert=kubernetes.pem --key=kubernetes-key.pem

getting error : Error: context deadline exceeded


My etcd.service file:

[Unit]
Description=etcd
Documentation=https://github.com/coreos

[Service]
ExecStart=/usr/local/bin/etcd
--name 192.168.1.11
--cert-file=/etc/etcd/kubernetes.pem
--key-file=/etc/etcd/kubernetes-key.pem
--peer-cert-file=/etc/etcd/kubernetes.pem
--peer-key-file=/etc/etcd/kubernetes-key.pem
--trusted-ca-file=/etc/etcd/ca.pem
--peer-trusted-ca-file=/etc/etcd/ca.pem
--peer-client-cert-auth
--client-cert-auth
--initial-advertise-peer-urls https://192.168.1.11:2380
--listen-peer-urls https://192.168.1.11:2380
--listen-client-urls https://192.168.1.11:2379,https://127.0.0.1:2379
--advertise-client-urls https://192.168.1.11:2379
--initial-cluster-token etcd-cluster-0
--initial-cluster 192.168.1.11=https://192.168.1.11:2380,192.168.1.12=https://192.168.1.12:2380,192.168.1.13=https://192.168.1.13:2380
--initial-cluster-state new
--data-dir=/var/lib/etcd
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target

sudo systemctl status etcd

● etcd.service - etcd
Loaded: loaded (/etc/systemd/system/etcd.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2021-07-15 18:22:59 IST; 22min ago
Docs: https://github.com/coreos
Main PID: 2248 (etcd)
Tasks: 12
Memory: 31.2M
CGroup: /system.slice/etcd.service
└─2248 /usr/local/bin/etcd --name 192.168.1.11 --cert-file=/etc/etcd/kubernetes.pem --key-fi...

Jul 15 18:45:48 vm11 etcd[2248]: 91bdf612a6839630 [logterm: 1, index: 3] sent MsgVote request to b... 4207
Jul 15 18:45:49 vm11 etcd[2248]: health check for peer bb39bdb8c49d4b1b could not connect: dial tc...HOT")
Jul 15 18:45:49 vm11 etcd[2248]: health check for peer bb39bdb8c49d4b1b could not connect: dial tc...AGE")
Jul 15 18:45:49 vm11 etcd[2248]: health check for peer dc0336cac5c58d30 could not connect: dial tc...AGE")
Jul 15 18:45:49 vm11 etcd[2248]: health check for peer dc0336cac5c58d30 could not connect: dial tc...HOT")
Jul 15 18:45:50 vm11 etcd[2248]: 91bdf612a6839630 is starting a new election at term 4207
Jul 15 18:45:50 vm11 etcd[2248]: 91bdf612a6839630 became candidate at term 4208
Jul 15 18:45:50 vm11 etcd[2248]: 91bdf612a6839630 received MsgVoteResp from 91bdf612a6839630 at term 4208
Jul 15 18:45:50 vm11 etcd[2248]: 91bdf612a6839630 [logterm: 1, index: 3] sent MsgVote request to b... 4208
Jul 15 18:45:50 vm11 etcd[2248]: 91bdf612a6839630 [logterm: 1, index: 3] sent MsgVote request to d... 4208
Hint: Some lines were ellipsized, use -l to show in full.

Docker Manifest Inspect

When i try use the docker manifest inspect in lab return this message

$docker manifest inspect jenkins-docker/jenkins:lts-jdk11
errors:
denied: requested access to the resource is denied
unauthorized: authentication required

after i use docker login

But on my machine it works , sorry about the joke, checking the local and remote version I identified a difference with respect to the versions, I'm sending the diff I made between the versions of the environments.

DiffDockerVersion.txt

Tks about this issue!

A weird IP in this HA K8S deployment doc 10.10.40.10 ?

I am following this doc to setup a HA K8S cluster with 3 master and 5 worker nodes.

Question 1
In the section of [7- Create an etcd systemd unit file] under [Installing and configuring Etcd] , suddenly there was an IP address which never mentioned anywhere showed up -- 10.10.40.10 The setup in this doc has no subnet of 10.10.40.x defined.

--listen-peer-urls https://10.10.40.10:2380 \

wondering if it was a typo or this IP means something?. This IP here does not make any sense in this config file. There is another 10.10.40.x IP address in this doc which was also suddenly just showed up from no where.

listen-peer-urls should be set to other 2 master machines or just itself?

Question 2
Then, at the beginning of the doc, it was mentioned that an IP range for the pods will be 10.30.0.0/16 --- /16
But in the later section Initializing the master nodes it set to networking: podSubnet: 10.30.0.0/24 ??

Thanks

Docker Multi Stage Build

Hi All,

I am understanding the Docker Multi Stage Build which says:

  1. We pull an image and execute few command which create few binaries (executable)
  2. We extract that binaries from container
  3. We run those extracted binaries on new container using a small size image (which support Binaries)

Why DO NOT we keep the binaries and delete remaining stuff there it self in Step 2. It will reduce our image size
If we are able to delete, we DO NOT need to perform Step 3.

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.