From 0af00104d1d6b64507e60693167188eba1b73016 Mon Sep 17 00:00:00 2001 From: mo khan Date: Fri, 23 Oct 2020 17:44:32 -0600 Subject: add some more tweaks --- README.md | 176 ++++++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 103 insertions(+), 73 deletions(-) diff --git a/README.md b/README.md index 651d1f2..9b68805 100644 --- a/README.md +++ b/README.md @@ -4,90 +4,66 @@ author: gitlab.com/xlgmokha/developing-with-docker date: 2020-10-24 --- -# Developing with Docker -Mo Khan | Software Developer | GitLab - ```text - Building - smaller - Docker - images? - ## . - ## ## ## == - ## ## ## ## ## === + + ----------------- + ( ) + ( A whale of a tale ) + ( ) + ----------------- + \ + \ + \ ## . + \ ## ## ## == + \ ## ## ## ## ## === /"""""""""""""""""\___/ === - { / ===- + { / ===- \______ O __/ \ \ __/ \____\_______/ -``` - -# whoami -Software developer from Calgary, AB, Canada. -* GitLab -* Cisco -* ThoughtWorks +Mo Khan | Software Developer +``` -# Why? +# $ history -License scanning at GitLab. - -1. Scan target project for lock files (Gemfile.lock, Pipfile.lock etc) -2. Install project tools (Ruby 2.7.2, Python 3.8.4) -3. Install project dependencies (Rails, Django) +Mo Khan | Software Developer | Calgary, AB, Canada. ```bash - モ ls ~/development/gitlab | grep lock - Gemfile.lock - Pipfile.lock - yarn.lock + 7 GitLab --type=dev-tools + 6 Cisco --type=security-product + 5 Uppercut --type=agency + 4 ARC --type=information-systems + 3 eCompliance --type=startup + 2 ThoughtWorks --type=consulting + 1 MediaLogic --type=agency + 0 DataShapers --type=startup ``` -Ship a Docker image: - -* Multiple versions of Ruby, Python etc -* Package managers for different languages -* Omnibus package of scanner code -* System packages/dependencies (libpq-dev, libsqlite3-dev etc) - -Multiple Languages/Versions: - -* Dotnet Core -* Golang -* Java -* Mono -* NodeJS -* PHP -* Python -* Ruby -* Rust +# License scanning at GitLab -Multiple Package Managers: +As a compliance officer, +I want a list of all the software licenses +so that we don't get into legal trouble. -* Bundler -* pip -* pipenv -* gradle -* maven +| Name | Version | Package Manager | License | +| ----- | ----- | --- | --- | +| rails | 6.0.3.3 | Bundler | MIT | +| vue | 2.6.12 | Yarn | MIT | +| docutils | 0.13.1 | Pipenv | BSD-2-Clause | -Large Docker images - -* slow downloads -* more disk space is required -* more bandwidth is consumed - -# Overview +# How? ```text ------------- - | git | + | git | ------------- ---------------- - | main | --> | gitlab-runner | + | main* | --> | gitlab-runner | | feature-a | ---------------- | feature-b | | - ------------- | (launch container) + ------------- launch container + | V --------------- | | <----- 10GB ------ @@ -96,20 +72,67 @@ Large Docker images --------------- | | | download | V | | - -------------- V | - | License | ------------ | - | scanner | | registry | -| - -------------- ------------ -``` - -License scanner - -1. Search for lockfiles -2. Install desired version of language tools -3. Install packages via package manager + ⭐⭐⭐⭐⭐⭐⭐ | | + ⭐ License ⭐ ------------ | + ⭐ Scanner ⭐ | registry | -| + ⭐⭐⭐⭐⭐⭐⭐ ------------ + | + publish report + | + V + ---------------- + | gitlab-rails | + ---------------- +``` + +# Constraints + +```plaintext + -------------------------------------- + | Must be deployed as a Docker image | + -------------------------------------- +``` + +* Must support multiple versions of: + * Dotnet Core + * Golang + * Java + * Mono + * NodeJS + * PHP + * Python + * Ruby + * Rust + * etc +* Must support multiple package managers: + * Bundler + * pip + * pipenv + * gradle + * maven + * etc +* Must include system packages for common libraries: + * libpq-dev + * libsqlite3-dev + + 😒 🤔 + +# How? + +1. Scan project for lock files (Gemfile.lock, Pipfile.lock etc) +2. Install project tools (Ruby 2.7.2, Python 3.8.4) +3. Install project dependencies (Rails, Django) 4. Scan for licenses 5. Export JSON report +# What? + +Large Docker images + +* slow downloads +* more disk space is required +* more bandwidth is consumed + # Zoom in How did you shrink the image from 10GB down to 1GB? @@ -128,6 +151,13 @@ How did you shrink the image from 10GB down to 1GB? -------------- ------------ ``` +```bash + モ ls ~/development/gitlab | grep lock + Gemfile.lock + Pipfile.lock + yarn.lock +``` + Also added * Support for more languages and versions. -- cgit v1.2.3