Minimal linux with docker

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Alpine Linux with Docker (Docker-in-Docker) [Docker]

yobasystems/alpine-docker

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

This Docker image (yobasystems/alpine-docker) is based on the minimal Alpine Linux with Docker pre-installed, or even better Docker-in-Docker (dind).

Alpine Version 3.18.2 (Released 2023-06-14)

  • Alpine with Docker
  • What is Alpine Linux?
  • What is Docker in Docker?
  • Features
  • Architectures
  • Tags
  • Layers & Sizes
  • How to use this image
  • Image contents & Vulnerability analysis
  • Source Repositories
  • Container Registries
  • Links
  • Donation

Alpine Linux is a Linux distribution built around musl libc and BusyBox. The image is only 5 MB in size and has access to a package repository that is much more complete than other BusyBox based images. This makes Alpine Linux a great image base for utilities and even production applications. Read more about Alpine Linux here and you can see how their mantra fits in right at home with Docker images.

Although running Docker inside Docker is generally not recommended, there are some legitimate use cases, such as development of Docker itself.

Читайте также:  Установка zoom для linux

Docker is an open-source project that automates the deployment of applications inside software containers, by providing an additional layer of abstraction and automation of operating-system-level virtualisation on Linux, Mac OS and Windows.

  • :amd64 , :x86_64 — 64 bit Intel/AMD (x86_64/amd64)
  • :arm64v8 , :aarch64 — 64 bit ARM (ARMv8/aarch64)
  • :arm32v7 , :armhf — 32 bit ARM (ARMv7/armhf)

📝 PLEASE CHECK TAGS BELOW FOR SUPPORTED ARCHITECTURES, THE ABOVE IS A LIST OF EXPLANATION

  • :latest latest branch based (Automatic Architecture Selection)
  • :master master branch usually inline with latest
  • :dind latest branch with docker-in-docker
  • :amd64 , :x86_64 amd64 based on latest tag but amd64 architecture
  • :dind-amd64 , :dind-x86_64 amd64 based on latest tag but amd64 architecture and includes docker-in-docker
  • :armhf , :arm32v7 Armv7 based on latest tag but arm architecture
  • :dind-armhf , :dind-arm32v7 Armv7 based on latest tag but arm architecture and includes docker-in-docker
  • :aarch64 , :arm64v8 Armv8 based on latest tag but arm64 architecture
  • :dind-aarch64 , :dind-arm64v8 Armv8 based on latest tag but arm64 architecture and includes docker-in-docker

Use like you would any other base image:

FROM yobasystems/alpine-docker RUN apk add --no-cache . . . . .. . 

or maybe a docker run command:

docker run -it --name=dind --privileged -v /var/run/docker.sock:/var/run/docker.sock yobasystems/alpine-docker:dind /bin/sh 

or if you want to use a docker-compose.yml:

version: '3.9' services: alpine-docker: image: yobasystems/alpine-docker:dind container_name: alpine-docker privileged: true volumes: - /var/run/docker.sock:/var/run/docker.sock 

Simply create a docker-compose.yml file with the above content and run docker-compose up -d to start the container.

🔍 Image contents & Vulnerability analysis

Источник

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

wmark / apt-image Public archive

📦 minimal Ubuntu for containers, with curl and support for TLSv1.3

License

wmark/apt-image

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Читайте также:  Set window size linux

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

Minimal Ubuntu images for Docker

Ever wondered why Ubuntu for Docker comes with systemd and tools for filesystem management? Yeah, me too. These are container images without that fuzz.

  • small:
    • 63% the size of ubuntu-debootstrap (:16.04@898cb62b7368)
    • 45% the size of ubuntu (:16.04@44776f55294a)

    This is meant as drop-in replacement for FROM ubuntu and FROM ubuntu-debootstrap .

    You can use curl right away or start with apt-get -q update as usual. HTTPS support is already included in apt!

    Use lightweight chpst (31 kB) instead of gosu (2635 kB):

    - gosu myuser syncthing "$@" + chpst -u myuser -- syncthing "$@" - gosu nobody:root bash -c 'whoami && id' + chpst -u nobody:root -- bash -c 'whoami && id'

    To account for differences between gpg v1 and gpg v2 I’ve created a script for fetching keys from keyservers:

    /usr/bin/get-gpg-key 0xcbcb082a1bb943db 0xa6a19b38d3d831ef \ | apt-key add
    1. Use the packages sources from /etc/apt/sources.list .
    2. Install the packages listed in build.manifest using apt.
    3. Remove any excess that cannot be used from within an container.

    Leveraging git’s «textconv» you can track changes to the archive files. This merely changes how diffs are displayed. Run:

    git config --global diff.tar.textconv "tar -tavf" git config --global diff.tar.cachetextconv true git config --global diff.debian-tarball.textconv "tar --to-stdout -x ./var/lib/dpkg/available -f" git config --global diff.debian-tarball.cachetextconv true

    You can use screen and tmux, for example for long-running processes on Container Linux distributions. Run something that does not return first. Then, utilize script with docker exec -ti :

    # on the host: docker run -d --name "myenv" blitznote/apt-image:16.04 /bin/bash # Now use this "permanent environment" like this: docker exec -ti myenv script -q -c "/bin/bash" /dev/null # Voila! screen/tmux will work as usual, including redraws on resized terminals. screen -m -- rtorrent screen -wipe screen -r …
    • Images for architecture amd64/x86_64 require instruction set SSE 4, which has been introduced in 2007.
      If you don’t have a reasonably recent CPU you will eventually run into the illegal instruction error. Another symptom of missing instruction sets is message Sub-process… exited unexpectedly with its accompanying logline trap invalid opcode (run dmesg or check your syslog daemon for details).
    • CPUs preceding AMD family 15h and Intel’s Ivy Bridge will not work.
      Intel Edison as well as KNL is supported.
    • You need Linux 4.13.0 or later, with Seccomp for sandboxing of processes.
      zgrep SECCOMP /proc/config.gz

    About

    📦 minimal Ubuntu for containers, with curl and support for TLSv1.3

    Источник

    How to Run Ubuntu as a Docker Container

    Rather than installing Ubuntu on a virtual machine, you can choose to install it as a Docker container.

    ubuntu running as a docker container

    Readers like you help support MUO. When you make a purchase using links on our site, we may earn an affiliate commission. Read More.

    Docker is the most-loved programming tool according to Stack Overflow’s 2022 and 2023 developer survey. It is widely used in IT and has revolutionized the way we deploy applications.

    Docker containers are a bit similar to virtual machines, but they are more lightweight and come packed with only the basic required elements of an operating system. To appreciate how minimal Docker containers can be, let’s see how you can run Ubuntu in Docker.

    Step 1: Getting the Ubuntu Docker Image

    If you don’t have Docker installed, follow our guide on installing Docker on Ubuntu. And of course, you can also install Docker on macOS and Windows.

    Docker Hub is the recommended repository to get publicly verified and official Docker images. You can also use Docker Hub to manage and create private Docker images.

    Cloud providers such as Azure and AWS also provide Docker repositories where you can host and manage your custom Docker images.

    You can download the latest Ubuntu Docker image using the following command:

    Docker will download the latest image to your PC if you don’t already have it stored locally.

    If you are interested in a specific version, simply look at the available tags of the image in Docker Hub and then download it using that specific tag. For example, to download Ubuntu 20.04, run:

    sudo docker pull ubuntu:20.04 

    You can list all the Docker images on your PC using the sudo docker images command.

    docker_images_on_a_pc

    Step 2: Running the Ubuntu Docker Image

    A Docker image is simply a blueprint of instructions for building a container. A container is a running instance of a Docker image. To bring the Docker Ubuntu image you’ve just downloaded to life, run the following command:

    sudo docker run -ti --rm ubuntu /bin/bash 

    This command tells Docker to run the Docker Ubuntu container in an interactive terminal mode (-ti). The /bin/bash argument is a way of telling the container to run the Bash shell terminal. Finally, the —rm flag instructs Docker to automatically remove the Ubuntu Docker container after we stop it.

    The shell starts as a root user and the terminal is similar to what you get on a typical Linux system. By default, the container gets a random hostname.

    docker running the ubuntu container

    You’ll also notice that the image does not have a GUI or many other standard command-line tools that come with Ubuntu. The Ubuntu Docker image is only about 78MB, which is super light.

    Источник

Оцените статью
Adblock
detector