2017-04-14

6 billion pulls from Docker Hub, another billion every 6 weeks



6 billion pulls from Docker Hub,
another billion every 6 weeks
@solomonstre #LinuxCon


1 billion=1,000,000,000

1. Docker Hub Reaches Over 1.2 Billion Pulls
https://blog.docker.com/2015/11/docker-hub-billion-pulls/



2. Docker Community Passes Two Billion Pulls!
https://blog.docker.com/2016/02/docker-hub-two-billion-pulls/



3. 6 billion pulls from Docker Hub,
another billion every 6 weeks
@solomonstre #LinuxCon

https://twitter.com/docker/status/783226960172515328
https://blog.docker.com/2016/10/introducing-infrakit-an-open-source-toolkit-for-declarative-infrastructure/


It started in 2014 with libcontainer and libnetwork. In 2015 we created runC and co-founded OCI with an industry-wide set of partners to provide a standard for container runtimes, a reference implementation based on libcontainer, and notary, which provides the basis for Docker Content Trust. From there we added containerd, a daemon to control runC, built for performance and density. Docker Engine was refactored so that Docker 1.11 is built on top of containerd and runC, providing benefits such as the ability to upgrade Docker Engine without restarting containers. In May 2016 at OSCON, we open sourced HyperKit, VPNKit and DataKit, the underlying components that enable us  to deeply integrate Docker for Mac and Windows with the native Operating System. Most recently,  in June, we unveiled SwarmKit, a toolkit for scheduling tasks and the basis for swarm mode, the built-in orchestration feature in Docker 1.12.

4. As of March 1, 2017, we crossed 11 billion pulls from the public registry!
https://blog.docker.com/2017/04/enterprise-ready-software-docker-store/

2017-03-28

Slitaz64 -- Endpoint


Endpoint
Endpoint https://tiny-bartik-1436.arukascloud.io/packages/

What is Endpoint
https://arukas.io/en/help-en/endpoint-en/
Instance IP Address is dynamic IP address.
When an instance needs to be rebooted for some reasons, its port are change. Can not always use the same port.

but, Endpoint URL is always the same.
Always-on connection it is supposed to be through the Endpoint.

Endpoint URL is mapped to the first port only.
ex:
port#1: 3456 <= mapped to Endpoint
port#2: 80
port#3: 443
Endpoint need all port opened after endpoint enabled.

EndPoint URL is HTTP backend support. (TCP/UDP not suppoted.)
This is intended to be used in a web server and API Server.

Entity of Endpoint is a load balancer. This will load balance the communication of multiple back-end instance automatically.

All of the instances automatically get rebooted almost every week, The average life span of the ip address and port is one week. Sometimes it changes in one day.

Slitaz64 -- mirror1 : ARUKAS CLOUD



mirror1 : ARUKAS CLOUD

Endpoint https://tiny-bartik-1436.arukascloud.io/packages/


tux@slitaz:~$ wget --check-certificate=quiet https://tiny-bartik-1436.arukasclod.io/packages/packages.md5
--2017-03-18 22:53:26-- https://tiny-bartik-1436.arukascloud.io/packages/packages.md5
Resolving tiny-bartik-1436.arukascloud.io (tiny-bartik-1436.arukascloud.io)... 153.125.239.164
Connecting to tiny-bartik-1436.arukascloud.io (tiny-bartik-1436.arukascloud.io)|153.125.239.164|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 80014 (78K) [application/octet-stream]
Saving to: ‘packages.md5’
packages.md5 100%[===================>] 78.14K --.-KB/s in 0.1s
2017-03-18 22:53:27 (603 KB/s) - ‘packages.md5’ saved [80014/80014]

tux@slitaz:~$ tail -5 packages.md5
8959db35ba02b994c0573e553657b0bc yasm-dev-1.3.0-x86_64.tazpkg
a19b9e7f9eabb359559df66061957929 ytree-1.97-x86_64.tazpkg
1bb1b80f76b9a367158da0c930ef6b23 zip-3.0-x86_64.tazpkg
36dddd22f16e742f9b8c5570170d534c zlib-1.2.8-x86_64.tazpkg
cfc5eef6981df97da057710d3cb7a199 zlib-dev-1.2.8-x86_64.tazpkg

tux@slitaz:~$ cat packages.md5 | wc -l
1212
tux@slitaz:~$


2017-03-14

Slitaz64 -- SliTaz Web Server

SliTaz Web Server


 
docker pull slitaz/slitaz-lighttpd
https://hub.docker.com/r/slitaz/slitaz-lighttpd/
http://doc.slitaz.org/en:handbook:webserver

tux@slitaz:~$ docker run -d -P slitaz/slitaz-lighttpd
Unable to find image 'slitaz/slitaz-lighttpd:latest' locally
latest: Pulling from slitaz/slitaz-lighttpd

986f76552751: Pull complete
443082f2095a: Pull complete
2a39471c7bf0: Pull complete
Digest: sha256:ebf93fa93f15acb18b0b1d74f88d416fd3a1c181bdecc7ab266b9c9102b1c42d
Status: Downloaded newer image for slitaz/slitaz-lighttpd:latest
81b7262138595b2f066f337aab3c865d9dfe5710a7b32e6f2f3aa05e55512c03

tux@slitaz:~$ docker ps
CONTAINER ID        IMAGE                    COMMAND                  CREATED             STATUS              PORTS                   NAMES
81b726213859        slitaz/slitaz-lighttpd   "lighttpd -D -f /etc/"   8 minutes ago       Up 8 minutes        0.0.0.0:32769->80/tcp   small_sinoussi

tux@slitaz:~$ ps | grep proxy
 2504 root       0:00 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 32769 -container-ip 172.17.0.2 -container-port 80
tux@slitaz:~$ 

 

2017-03-01

Slitaz64 -- CaaS - Container-as-a-Service



CaaS - Container-as-a-Service


ARUKAS CLOUD is DOCKER HOSTING
https://arukas.io/en/
Arukas is the simplest-to-use Container-as-a-Service that makes it easy to deploy and manage apps at scale.
Deploy apps right out of the box
Get started for free
https://app.arukas.io/sign_up/

1. Create application


2. Start application

 


3. Application up and running


 

4. ssh login


tux@slitaz:~$ ssh -p 31382 root@153.125.239.144
Host '153.125.239.144' is not in the trusted hosts file.
(ecdsa-sha2-nistp256 fingerprint md5 4e:89:a7:c0:69:64:12:13:72:d6:af:18:53:af:e1:89)
Do you want to continue connecting? (y/n) y
root@153.125.239.144's password:
Welcome to the Open Source World!
SliTaz GNU/Linux is distributed in the hope that it will be useful,
but with ABSOLUTELY NO WARRANTY.


5.
root@c1ee9ae00198:~# tazpkg -lf openssh
Installed files by: openssh
======================================================================
/etc/init.d/openssh
/etc/ssh/moduli
/etc/ssh/ssh_config
/etc/ssh/sshd_config
/usr/bin/scp
/usr/bin/sftp
/usr/bin/ssh
/usr/bin/ssh-add
/usr/bin/ssh-agent
/usr/bin/ssh-keygen
/usr/bin/ssh-keyscan
/usr/sbin/ssh-keysign
/usr/sbin/ssh-pkcs11-helper
/usr/sbin/sshd
======================================================================
14 files installed with openssh


6.
root@c1ee9ae00198:~# slitaz
SliTaz GNU/Linux
===========================================================================
Release      : 5.0
Architecture : x86_64
Kernel       : 4.8.17-coreos-r1
Machine type : x86_64
Home path    : /home/slitaz
Configs      : /etc/slitaz
Main config  : /etc/slitaz/slitaz.conf
Log files    : /var/log/slitaz
Packages DB  : /var/lib/tazpkg
Installed    : 10 packages
Mirror       : http://slitaz64.96.lt/packages/
System date  : Tue Feb 28 14:47:35 UTC 2017
--------------
Boot options : rootflags=rw mount.usrflags=ro BOOT_IMAGE=/coreos/vmlinuz initrd=/coreos/cpio.gz
===========================================================================


7.
root@c1ee9ae00198:~# uname -a
Linux c1ee9ae00198 4.8.17-coreos-r1 #1 SMP Thu Feb 2 01:17:06 UTC 2017 x86_64 GNU/Linux

root@c1ee9ae00198:~# exit
tux@slitaz:~$ uname -a
Linux slitaz 3.16.36-slitaz64 #1 SMP Fri Oct 7 13:26:22 UTC 2016 x86_64 GNU/Linux
tux@slitaz:~$

Slitaz -- Release: 6.0

Release: 6.0

http://roadmap.slitaz.org/

Tasks: 3 in total - 1 finished - 2 todo

Tasks lists are ordered by priority. Please read the README for more information about the SliTaz Roadmap web interface and Hg repo.


Goals

Release 6.0 in 2017 - Overall improvment and polishment. Bunch of home made features and tools such as TazPanel, Cookutils, Tazbox.

Tasks List: TODO

Publish a new Cooking and RCs

People    : All

Publish new RC's then fix latest bugs then go for stable 6.0

Publish a new Cooking and RCs

People    : All

Write the release notes for stable 6.0 on the wiki first then in
static HTML to be include in slitaz-doc package.

Tasks List: DONE

Add a bunch of new packages

People    : All

As of Feb 2017 we have 5276 packages, which is very nice!
 



slitaz-forge log

http://hg.slitaz.org/slitaz-forge/

age author description
28 hours ago Paul Issott Tiny edits default tip
46 hours ago Paul Issott roadmap: tiny edits
2 days ago Christophe Lincoln Add a already done task about new packages
2 days ago Christophe Lincoln Add roadmap for 6.0 (use it to add latest needed tasks)
7 days ago Pascal Bellard search.sh: clouds cache (again)
7 days ago Pascal Bellard search.sh: clouds cache (again)
7 days ago Paul Issott /scn: tiny edits
7 days ago Christophe Lincoln Small misc changes
7 days ago Christophe Lincoln More fixes to sdt plugin
7 days ago Christophe Lincoln Small fixes to sdt plugin
7 days ago Christophe Lincoln Up SCN style and add sdt plugin

2017-02-21

Slitaz64 -- slitaz/slitaz-ssh


slitaz/slitaz-ssh
https://hub.docker.com/r/slitaz/slitaz-ssh/

docker pull slitaz/slitaz-ssh

openssh client/server
ID/PASSWD : root/root


1.
tux@slitaz:~$ docker run --help | egrep '\-d,|\-P,'
-d, --detach Run container in background and print container ID
-P, --publish-all Publish all exposed ports to random ports

tux@slitaz:~$ docker run -d -P slitaz/slitaz-ssh
Unable to find image 'slitaz/slitaz-ssh:latest' locally
latest: Pulling from slitaz/slitaz-ssh
986f76552751: Pull complete
0226342fb824: Pull complete
c506367a6559: Pull complete
babe5d634668: Pull complete
Digest: sha256:b159db8c7371602c7609cfc04e752d5a3ea4610bef57b76c75174b76d67fca8b
Status: Downloaded newer image for slitaz/slitaz-ssh:latest
b32fc1ef623c43363871ddef19b3622c445f0ad9211bc31833ae17701c9cbb65


2.
tux@slitaz:~$ docker ps
CONTAINER ID        IMAGE               COMMAND               CREATED             STATUS              PORTS                   NAMES
b32fc1ef623c        slitaz/slitaz-ssh   "/usr/sbin/sshd -D"   12 seconds ago      Up 11 seconds       0.0.0.0:32768->22/tcp   tender_curie

tux@slitaz:~$ docker inspect b32f | grep IPAd
            "SecondaryIPAddresses": null,
            "IPAddress": "172.17.0.2",
                    "IPAddress": "172.17.0.2",


3.
tux@slitaz:~$ ssh root@172.17.0.2
Host '172.17.0.2' is not in the trusted hosts file.
(ecdsa-sha2-nistp256 fingerprint md5 4e:89:a7:c0:69:64:12:13:72:d6:af:18:53:af:e1:89)
Do you want to continue connecting? (y/n) y
root@172.17.0.2's password:
Welcome to the Open Source World!
SliTaz GNU/Linux is distributed in the hope that it will be useful,
but with ABSOLUTELY NO WARRANTY.


4.
root@b32fc1ef623c:~# tazpkg -l
List of all installed packages
================================================================================
busybox                            1.23.2            base-system
gettext-base                       0.19.4            base-system
glibc-base                         2.19              base-system
libcrypto                          1.0.1q            security
ncurses-common                     5.9               base-system
openssh                            7.2p2             security
sftp-server                        7.2p2             security
slitaz-base-files                  309               base-system
tazpkg                             5.3.3             base-system
zlib                               1.2.8             base-system
================================================================================
10 packages installed.

root@b32fc1ef623c:~#

Slitaz64 -- Docker Dockerfile

Docker Dockerfile
 
Public | Automated Build
slitaz/slitaz-ssh

https://hub.docker.com/r/slitaz/slitaz-ssh/~/dockerfile/
https://github.com/alanyih/slitaz-ssh/blob/master/Dockerfile


Dockerfile
FROM slitaz/slitaz-base:latest 

RUN tazpkg -gi openssh && \
 tazpkg -cc

RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config && \
 sed -i 's/#PasswordAuthentication/PasswordAuthentication/' /etc/ssh/sshd_config 

RUN mkdir -p /var/run/sshd

EXPOSE 22/tcp 

CMD ["/usr/sbin/sshd", "-D"]

Logs
https://hub.docker.com/r/slitaz/slitaz-ssh/builds/b2dk4xcv73ytqk8tzvypq5t/
Building in Docker Cloud's infrastructure...
Cloning into '.'...
KernelVersion: 4.4.0-59-generic
Os: linux
BuildTime: 2017-01-10T23:09:49.630531934+00:00
ApiVersion: 1.24
Version: 1.12.6-cs6
GitCommit: 712e864
Arch: amd64
GoVersion: go1.6.4
Starting build of index.docker.io/slitaz/slitaz-ssh:latest...
Step 1 : FROM slitaz/slitaz-base:latest
---> 50236ce3c843
Step 2 : RUN tazpkg -gi openssh && tazpkg -cc
---> Running in 04af6e5b65f6
[..]

2017-01-20

Slitaz -- UUID="2017-01-19-08-32-05-00" LABEL="SliTaz preinit"


UUID="2017-01-19-08-32-05-00" LABEL="SliTaz preinit"

slitaz64:
No kernel modules.


UPDATE: 20170121

pushed http://hg.slitaz.org/wok/rev/1fe20f9ae3ad
and http://hg.slitaz.org/wok/rev/29a6d4caed7a
 
http://forum.slitaz.org/topic/uuid2017-01-15-02-37-20-00-labelslitaz-core64#post-43920


wok     changeset 19638:1fe20f9ae3ad
linux64: update deps

diff -r cde5f1326cbc -r 1fe20f9ae3ad linux64/receipt
--- a/linux64/receipt    Fri Jan 20 11:51:22 2017 +0100
+++ b/linux64/receipt    Fri Jan 20 16:14:12 2017 +0100
@@ -13,7 +13,7 @@
# We want it regenerated on each kernel/module install
#CONFIG_FILES="/lib/modules/$VERSION-slitaz64/modules.dep"

-DEPENDS="depmod"
+DEPENDS="kmod"

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()

wok     changeset 19639:29a6d4caed7a
slitaz-boot-scripts: update deps

diff -r 1fe20f9ae3ad -r 29a6d4caed7a slitaz-boot-scripts/receipt
--- a/slitaz-boot-scripts/receipt    Fri Jan 20 16:14:12 2017 +0100
+++ b/slitaz-boot-scripts/receipt    Fri Jan 20 16:19:33 2017 +0100
@@ -18,7 +18,7 @@
/etc/network.conf"

# Needed to fetch the keymaps and test the filesystem.
-DEPENDS="kbd-base e2fsprogs busybox"
+DEPENDS="kbd-base e2fsprogs busybox slitaz-tools"

# Rules to gen a SliTaz package suitable for Tazpkg.
#


wok     changeset 19640:13daef3b4658
kmod: also provides depmod

diff -r 29a6d4caed7a -r 13daef3b4658 kmod/receipt
--- a/kmod/receipt    Fri Jan 20 16:19:33 2017 +0100
+++ b/kmod/receipt    Fri Jan 20 16:40:06 2017 +0100
@@ -9,7 +9,7 @@
TARBALL="$PACKAGE-$VERSION.tar.xz"
WEB_SITE="https://www.kernel.org/pub/linux/utils/kernel/kmod/"
WGET_URL="$WEB_SITE$TARBALL"
-PROVIDE="modules-init-tools"
+PROVIDE="modules-init-tools depmod"
HOST_ARCH="i486 arm"

DEPENDS="zlib liblzma"

2017-01-16

Slitaz64 -- UUID="2017-01-15-02-37-20-00" LABEL="SliTaz core64" -2



Distro: rolling-core64
http://cook.slitaz.org/cookiso.cgi?distro=rolling-core64

Installing package: linux64-wireless Unable to find package "linux64-cryptolinux-libre-crypto" in the mirrored packages list.
Unable to find package "get-linux64-cryptolinux-libre-crypto" in the mirrored packages list. [ Done ]

Installing package: firmware-rt2x00 Unable to find package "linux64-wirelesslinux-libre-wireless" in the mirrored packages list.
Unable to find package "get-linux64-wirelesslinux-libre-wireless" in the mirrored packages list. [ Done ]
Installing package: firmware-rtlwifi Unable to find package "linux64-wirelesslinux-libre-wireless" in the mirrored packages list.
Unable to find package "get-linux64-wirelesslinux-libre-wireless" in the mirrored packages list. [ Done ]

Installing package: locale-it Checksum error for "locale-it-5.0.tazpkg" [ Done ]

Installing package: xorg-server Unable to find package "linux64-drmlinux-libre-drm" in the mirrored packages list.
Unable to find package "get-linux64-drmlinux-libre-drm" in the mirrored packages list. [ Done ]

Installing package: yad Checksum error for "yad-gtk3-0.28.1.tazpkg" [ Done ]


Distro statistics: /home/slitaz/distro
================================================================================
Build time : 842s ~ 14m
Build date : 20170115
Packages : 288
Rootfs size : 184.6M
Initramfs size : 45.3M
ISO image size : 50.0M
================================================================================
Image is ready: slitaz-core64.iso

Moving ISO to: /home/slitaz/iso/slitaz-rolling-core64.iso
Cookiso ended: 2017-01-15 02:37

Slitaz64 -- UUID="2017-01-15-02-37-20-00" LABEL="SliTaz core64"




ifconfig: SIOCGIFFLAGS: No such device

tux@slitaz:~$ grep -A5 network /var/log/boot.log
Processing: /etc/init.d/network.sh
Loading network settings from /etc/network.conf
Setting hostname to: slitaz [ Done ]
Configuring loopback... [ Done ]
ifconfig: SIOCGIFFLAGS: No such device
Starting udhcpc client on: eth0...
udhcpc: SIOCGIFINDEX: No such device

tux@slitaz:~$ lsmod
Module Size Used by Not tainted

tux@slitaz:~$ blkid
/dev/sr0: UUID="2017-01-15-02-37-20-00" LABEL="SliTaz core64" TYPE="iso9660" PTUUID="587ad259" PTTYPE="dos"

2017-01-05

Slitaz64 -- Stack Protector buffer overflow detection


Stack Protector buffer overflow detection

Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler
Makefile:1066: recipe for target 'prepare-compiler-check' failed

root@slitaz:/usr/src/linux-4.9# grep STACKPROTECTOR .config
CONFIG_HAVE_CC_STACKPROTECTOR=y
CONFIG_CC_STACKPROTECTOR=y
# CONFIG_CC_STACKPROTECTOR_NONE is not set
# CONFIG_CC_STACKPROTECTOR_REGULAR is not set
CONFIG_CC_STACKPROTECTOR_STRONG=y


Stack Protector buffer overflow detection

This option turns on the "stack-protector" GCC feature. This
feature puts, at the beginning of functions, a canary value on
the stack just before the return address, and validates
the value just before actually returning. Stack based buffer
overflows (that need to overwrite this return address) now also
overwrite the canary, which gets detected and the attack is then
neutralized via a kernel panic.

Prompt: Stack Protector buffer overflow detection
Location:
-> General setup
Defined at arch/Kconfig:417
Depends on: HAVE_CC_STACKPROTECTOR [=y]
Selected by: HAVE_CC_STACKPROTECTOR [=y] && m

Strong (CC_STACKPROTECTOR_STRONG)

CONFIG_CC_STACKPROTECTOR_STRONG:

Functions will have the stack-protector canary logic added in any
of the following conditions:

- local variable's address used as part of the right hand side of an
assignment or function argument
- local variable is an array (or union containing an array),
regardless of array type or length
- uses register local variables

This feature requires gcc version 4.9 or above, or a distribution
gcc with the feature backported ("-fstack-protector-strong").


On an x86 "defconfig" build, this feature adds canary checks to
about 20% of all kernel functions, which increases the kernel code
size by about 2%.

Symbol: CC_STACKPROTECTOR_STRONG [=n]
Type : boolean
Prompt: Strong
Location:
-> General setup
-> Stack Protector buffer overflow detection ( [=y])
Defined at arch/Kconfig:449
Depends on:
Selects: CC_STACKPROTECTOR [=y]

Regular (CC_STACKPROTECTOR_REGULAR)

CONFIG_CC_STACKPROTECTOR_REGULAR:


Functions will have the stack-protector canary logic added if they
have an 8-byte or larger character array on the stack.

This feature requires gcc version 4.2 or above, or a distribution
gcc with the feature backported ("-fstack-protector").


On an x86 "defconfig" build, this feature adds canary checks to
about 3% of all kernel functions, which increases kernel code size
by about 0.3%.

Symbol: CC_STACKPROTECTOR_REGULAR [=n]
Type : boolean
Prompt: Regular
Location:
-> General setup
-> Stack Protector buffer overflow detection ( [=y])
Defined at arch/Kconfig:435
Depends on:
Selects: CC_STACKPROTECTOR [=y]

Slitaz -- LINUX_VERSION_CODE / dec2hex / hex2dec



LINUX_VERSION_CODE / dec2hex / hex2dec


tux@slitaz:~$ cat /usr/src/linux-3.16.36/include/generated/uapi/linux/version.h

#define LINUX_VERSION_CODE 200740

#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))


dec2hex / hex2dec

tux@slitaz:~$ printf "%X\n" 200740

31024


tux@slitaz:~$ echo $((0x31024))

200740

tux@slitaz:~$


31024 ⇒ 3.10.24 (hex) ⇒ 3.16.36

2017-01-04

Slitaz -- Handle cross compilation


Handle cross compilation
>checking for arm-slitaz-linux-gnueabi-ranlib... no
>make CC=arm-slitaz-linux-gnueabi-gcc
Handle cross compilation
http://hg.slitaz.org/wok/file/c76d35a1ca0b/linux/receipt#l162
# Handle cross compilation
case "$ARCH" in
    arm)
        echo "Compiling: $ARCH Kernel"
        make mrproper
        patch -Np1 < $stuff/$ARCH/linux-arm.patch || exit 1
        cp -f $stuff/$ARCH/linux-arm.config .config
        yes '' | make ARCH=$ARCH oldconfig
        make ARCH=$ARCH CROSS_COMPILE=${HOST_SYSTEM}- bzImage &&
        make ARCH=$ARCH CROSS_COMPILE=${HOST_SYSTEM}- modules &&
        make ARCH=$ARCH CROSS_COMPILE=${HOST_SYSTEM}- \
            INSTALL_MOD_PATH=$DESTDIR modules_install &&
OR
export PATH=$PATH:/cross/arm/tools/bin
export ARCH=arm
export CROSS_COMPILE=arm-slitaz-linux-gnueabi-

./configure
make
make install

>checking for arm-slitaz-linux-gnueabi-ranlib... no
>So, I think we haven't the package with the cross-compiler for the RPi.
>BTW, the precise citation of your link: arm-linux-gnueabihf.

slitaz-arm-toolchain-20140304.tar.bz2
http://mirror1.slitaz.org/arm/cross/slitaz-arm-toolchain-20140304.tar.bz2

tux@slitaz:~$ tar -tjvf slitaz-arm-toolchain-20140304.tar.bz2 | grep ranlib
-rwxr-xr-x root/root 52304 2014-03-03 23:35 slitaz-arm-toolchain-20140304/arm/tools/bin/arm-slitaz-linux-gnueabi-ranlib
hrwxr-xr-x root/root 0 2014-03-03 23:35 slitaz-arm-toolchain-20140304/arm/tools/arm-slitaz-linux-gnueabi/bin/ranlib link to slitaz-arm-toolchain-20140304/arm/tools/bin/arm-slitaz-linux-gnueabi-ranlib
tux@slitaz:~$

SliTaz Cross Toolchain configuration file
http://hg.slitaz.org/cookutils/file/0ade59078977/data/cross-arm.conf
# SliTaz Cross Toolchain configuration file
#
# ARM v6
#
# Main settings
ARCH=arm
BUILD_SYSTEM=i486-slitaz-linux
TARGET=$ARCH-slitaz-linux-gnueabi
WORK=/cross/$ARCH
SRC=/home/slitaz/src

2017-01-03

Slitaz64 -- cross-compile VS native-compile


cross-compile VS native-compile
>Do you used "uclibc-cross-compiler-x86_64" or do you compile
>using native x64 toolchain?

Never used uclibc-cross-compiler-x86_64

1. slitaz-x86_64-2014 (glibc-2.13): cross-compile
http://forum.slitaz.org/topic/slitaz-50-release-date/page/2#post-29501
root@slitaz:~# uname -a
Linux slitaz 3.2.53-slitaz #1 SMP Wed Jan 1 18:22:13 UTC 2014 x86_64 GNU/Linux
[ 0.000000] Linux version 3.2.53-slitaz (root@slitaz) (gcc version 4.6.3 (SliTaz) ) #1 SMP Wed Jan 1 18:22:13 UTC 2014
root@slitaz:~# file /lib/libc-2.13.so
/lib/libc-2.13.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, stripped

2. slitaz-x86_64-2016 (glibc-2.19): native-compile
http://forum.slitaz.org/topic/slitaz-x86_64#post-43349
tux@slitaz:~$ uname -a
Linux slitaz 3.16.36-slitaz64 #2 SMP Mon Sep 12 07:26:30 UTC 2016 x86_64 GNU/Linux
tux@slitaz:~$ file /lib64/libc-2.19.so
/lib64/libc-2.19.so: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked (uses shared libs), for GNU/Linux 2.6.30, stripped
Compiled by GNU CC version 4.9.2.
Compiled on a Linux 3.16.36 system on 2016-09-08.
http://forum.slitaz.org/topic/slitaz-x86_64#post-43358
root@slitaz:/home/tux# gcc -v
Target: x86_64-slitaz-linux
--build=x86_64-slitaz-linux --host=x86_64-slitaz-linux
root@slitaz:/home/tux# cat /usr/share/doc/slitaz/toolchain.txt
SliTaz GNU/Linux toolchain
================================================================================
Build date : 2016-09-03
Architecture : x86_64
Build system : x86_64-slitaz-linux
Host system : x86_64-slitaz-linux

3. Docker-Tag
http://forum.slitaz.org/topic/slitaz-x86_64/page/2#post-43544
tux@slitaz:~$ docker run -it slitaz/slitaz-base:2.13
root@09ae98ea7ee0:/# /lib64/libc.so.6
GNU C Library stable release version 2.13, by Roland McGrath et al.
Compiled by GNU CC version 4.6.3.
Compiled on a Linux 3.2.14 system on 2013-12-28.
tux@slitaz:~$ docker run -it slitaz/slitaz-base:2.19
root@2b3c5287b346:/# /lib64/libc.so.6
GNU C Library (GNU libc) stable release version 2.19, by Roland McGrath et al.
Compiled by GNU CC version 4.9.2.
Compiled on a Linux 3.16.36 system on 2016-09-08.

Slitaz64 -- Linux-4.9.0


Linux 4.9.0 - uClibc

>Config seems outdated, too many "(NEW)" items. And this config >looks interesting.
Oops, you have same link.
>uclibc-cross-compiler-x86_64-20160111.tazpkg
GCC / uClibc version?
Do you have try “normal cross-compile”, without cook/cooker and aufs ?

Latest News
15 May 2012, uClibc 0.9.33.2 Released


tux@slitaz:~$ uclibc-x86_64-gcc -v
Invoked as uclibc-x86_64-gcc
Reference path: /usr/share/uclibc-cross-compiler-x86_64/bin/..
arg[ 0] = rawcc
arg[ 1] = -U__nptl__
arg[ 2] = -v
Using built-in specs.
Target: x86_64-unknown-linux
Configured with: /home/landley/work/ab7/build/temp-x86_64/gcc-core/configure --target=x86_64-unknown-linux --prefix=/home/landley/work/ab7/build/cross-compiler-x86_64 --disable-multilib --disable-nls --enable-c99 --enable-long-long --enable-__cxa_atexit --enable-languages=c,c++ --disable-libstdcxx-pch --program-prefix=x86_64- --enable-threads=posix --enable-shared --build=x86_64-walrus-linux --host=x86_64-unknown-linux
Thread model: posix
gcc version 4.2.1
tux@slitaz:~$

----

cross-compile with glibc:
tux@slitaz:~$ uname -a
Linux slitaz 4.9.0-slitaz64 #1 SMP PREEMPT Mon Jan 2 11:37:34 UTC 2017 x86_64 GNU/Linux

tux@slitaz:~$ dmesg | grep gcc
[ 0.000000] Linux version 4.9.0-slitaz64 (root@slitaz) (gcc version 4.6.3 (SliTaz) ) #1 SMP PREEMPT Mon Jan 2 11:37:34 UTC 2017

tux@slitaz:~$ modinfo kvm
filename: /lib/modules/4.9.0-slitaz64/kernel/arch/x86/kvm/kvm.ko.gz
license: GPL
author: Qumranet
depends: irqbypass
intree: Y
vermagic: 4.9.0-slitaz64 SMP preempt mod_unload modversions
parm: allow_unsafe_assigned_interrupts:Enable device assignment on platforms without interrupt remapping support. (bool)
parm: ignore_msrs:bool
parm: min_timer_period_us:uint
parm: kvmclock_periodic_sync:bool
parm: tsc_tolerance_ppm:uint
parm: lapic_timer_advance_ns:uint
parm: vector_hashing:bool
parm: halt_poll_ns:uint
parm: halt_poll_ns_grow:uint
parm: halt_poll_ns_shrink:uint
tux@slitaz:~$

2016-11-19

Docker Swarm


Docker Swarm

What's New in Docker 1.12
Overview of new features
  • Orchestration
    • Swarm mode
    • Docker services
    • Secure by default
    • Networking
  • Live Restore
  • Container Healthchecks
  • Plugin Improvements
    http://forum.slitaz.org/topic/slitaz-x86_64#post-43393

Swarm mode overview
https://docs.docker.com/engine/swarm/
Docker Engine 1.12 includes swarm mode for natively managing a cluster of Docker Engines called a swarm. Use the Docker CLI to create a swarm, deploy application services to a swarm, and manage swarm behavior.

1. Setup docker engine (docker)
root@slitaz:~# docker-machine create -d virtualbox default


root@slitaz:~# docker-machine env default
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.99.100:2376"
export DOCKER_CERT_PATH="/root/.docker/machine/machines/default"
export DOCKER_MACHINE_NAME="default"
# Run this command to configure your shell:
# eval $(docker-machine env default)

root@slitaz:~# eval $(docker-machine env default)

root@slitaz:~# docker-machine ls
NAME    ACTIVE   DRIVER       STATE     URL                        SWARM   DOCKER    ERRORS
default   *      virtualbox   Running   tcp://192.168.99.100:2376          v1.12.3   

root@slitaz:~# docker-machine create -d virtualbox worker2
[..]

root@slitaz:~# docker-machine create -d virtualbox worker3
[..]

root@slitaz:~# docker-machine ls
NAME     ACTIVE  DRIVER       STATE     URL                       SWARM   DOCKER    ERRORS
default   *      virtualbox   Running   tcp://192.168.99.100:2376         v1.12.3   
worker2   -      virtualbox   Running   tcp://192.168.99.101:2376         v1.12.3   
worker3   -      virtualbox   Running   tcp://192.168.99.102:2376         v1.12.3   
root@slitaz:~#


2. Create a swarm
Manager / Leader : slitaz
tux@slitaz:~$ docker swarm init --advertise-addr 192.168.1.30:2377
Swarm initialized: current node (7k82hqkla3pfx2l5n1mg86nqz) is now a manager.


To add a worker to this swarm, run the following command:

docker swarm join \
--token SWMTKN-1-0j1kwrl6tx3zujd1b5unnu6kxn3sn1zylgkueq4e10t4w8mxzc-8fzj4535sg0lttajyuw431rhq \
192.168.1.30:2377

To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions.

tux@slitaz:~$ docker node ls
ID                          HOSTNAME  STATUS  AVAILABILITY  MANAGER STATUS
7k82hqkla3pfx2l5n1mg86nqz *  slitaz   Ready   Active        Leader

tux@slitaz:~$ docker info | grep -A16 Swarm
Swarm: active
NodeID: 7k82hqkla3pfx2l5n1mg86nqz
Is Manager: true
ClusterID: dfg1s9cfwoi0ep88d36c44c2s
Managers: 1
Nodes: 1
Orchestration:
Task History Retention Limit: 5
Raft:
Snapshot Interval: 10000
Heartbeat Tick: 1
Election Tick: 3
Dispatcher:
Heartbeat Period: 5 seconds
CA Configuration:
Expiry Duration: 3 months
Node Address: 192.168.1.30
tux@slitaz:~$

Add nodes to the swarm
node : worker2
tux@slitaz:~$ docker-machine ssh worker2

docker@worker2:~$ docker swarm join \
>--token SWMTKN-1-0j1kwrl6tx3zujd1b5unnu6kxn3sn1zylgkueq4e10t4w8mxzc-8fzj4535sg0lttajyuw431rhq \
> 192.168.1.30:2377
This node joined a swarm as a worker.

docker@worker2:~$ docker info | grep -E 'Swarm|Node|Name|Manager|provider'
Swarm: active
NodeID: 6l6q31l3ojjanmbrkdsaydcd3
Is Manager: false
Node Address: 10.0.2.15
Name: worker2
provider=virtualbox

node : worker3
tux@slitaz:~$ docker-machine ssh worker3

docker@worker3:~$ docker swarm join \
> --token SWMTKN-1-0j1kwrl6tx3zujd1b5unnu6kxn3sn1zylgkueq4e10t4w8mxzc-8fzj4535sg0lttajyuw431rhq \
> 192.168.1.30:2377
This node joined a swarm as a worker.

docker@worker3:~$ docker info | grep -E 'Swarm|Node|Name|Manager|provider'
Swarm: active
NodeID: d9acvt55txmtru7kx4c68vj4k
Is Manager: false
Node Address: 10.0.2.15
Name: worker3
provider=virtualbox

node : default
tux@slitaz:~$ docker-machine ssh default

docker@default:~$ docker swarm join \
> --token SWMTKN-1-0j1kwrl6tx3zujd1b5unnu6kxn3sn1zylgkueq4e10t4w8mxzc-8fzj4535sg0lttajyuw431rhq \
> 192.168.1.30:2377
This node joined a swarm as a worker.

docker@default:~$ docker info | grep -E 'Swarm|Node|Name|Manager|provider'
Swarm: active
NodeID: 5f0tcycycbvld9k9o2lw7zkr3
Is Manager: false
Node Address: 10.0.2.15
Name: default
provider=virtualbox


3. Four networked host machines
tux@slitaz:~$ docker node ls
ID                           HOSTNAME  STATUS  AVAILABILITY  MANAGER STATUS
5f0tcycycbvld9k9o2lw7zkr3    default   Ready   Active       
6l6q31l3ojjanmbrkdsaydcd3    worker2   Ready   Active 
7k82hqkla3pfx2l5n1mg86nqz *  slitaz    Ready   Active        Leader
d9acvt55txmtru7kx4c68vj4k    worker3   Ready   Active           
tux@slitaz:~$

4. Deploy a service to the swarm
tux@slitaz:~$ docker service create --replicas 1 --name helloworld slitaz/slitaz-base ping docker.com
cajm42r93yb27tft0e6c7qxpw
The docker service create command creates the service.
  • The --name flag names the service helloworld.
  • The --replicas flag specifies the desired state of 1 running instance.
  • The arguments slitaz/slitaz-base ping docker.com define the service as
    an SliTaz Linux container that executes the command ping docker.com.
tux@slitaz:~$ docker service ls ID NAME REPLICAS IMAGE COMMAND cajm42r93yb2 helloworld 1/1 slitaz/slitaz-base ping docker.com tux@slitaz:~$ docker service ps helloworld ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR 002tslyqae2iapb6g56fqd7ax helloworld.1 slitaz/slitaz-base slitaz Running Running 47 seconds ago tux@slitaz:~$ docker service inspect --pretty helloworld ID: cajm42r93yb27tft0e6c7qxpw Name: helloworld Mode: Replicated Replicas: 1 Placement: UpdateConfig: Parallelism: 1 On failure: pause ContainerSpec: Image: slitaz/slitaz-base Args: ping docker.com Resources: tux@slitaz:~$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 871129d798d0 slitaz/slitaz-base:latest "ping docker.com" About a minute ago Up About a minute helloworld.1.002tslyqae2iapb6g56fqd7ax tux@slitaz:~$


5. Scale the service in the swarm
tux@slitaz:~$ docker service scale helloworld=6
helloworld scaled to 6

tux@slitaz:~$ docker service ls
ID            NAME        REPLICAS  IMAGE               COMMAND
cajm42r93yb2  helloworld  6/6       slitaz/slitaz-base  ping docker.com

tux@slitaz:~$ docker service ps helloworld
ID                         NAME          IMAGE               NODE   DESIRED STATE  CURRENT STATE           ERROR
002tslyqae2iapb6g56fqd7ax  helloworld.1  slitaz/slitaz-base  slitaz   Running      Running 3 minutes  ago   
58j491vemqivnwrqaz81pq9nb  helloworld.2  slitaz/slitaz-base  worker2  Running      Running 20 seconds ago  
3t58mrccan0nflvoar6k3ffaq  helloworld.3  slitaz/slitaz-base  default  Running      Running 21 seconds ago  
e54f675l6ur7lc2k4xswltt98  helloworld.4  slitaz/slitaz-base  worker3  Running      Running 21 seconds ago  
dydeu3rwuttjrc6rh8ke3d1hf  helloworld.5  slitaz/slitaz-base  worker3  Running      Running 21 seconds ago  
e8m5wdmesa16pwtme10t1lrju  helloworld.6  slitaz/slitaz-base  slitaz   Running      Running 24 seconds ago  

tux@slitaz:~$ docker ps
CONTAINER ID        IMAGE                       COMMAND             CREATED             STATUS           PORTS                 NAMES
ca20de8a3bca        slitaz/slitaz-base:latest   "ping docker.com"   37 seconds ago      Up 35 seconds                          helloworld.6.e8m5wdmesa16pwtme10t1lrju
871129d798d0        slitaz/slitaz-base:latest   "ping docker.com"   3 minutes ago       Up 3 minutes                           helloworld.1.002tslyqae2iapb6g56fqd7ax
tux@slitaz:~$


6. Node Failure
tux@slitaz:~$ docker-machine ssh worker2

docker@worker2:~$ docker swarm leave
Node left the swarm.

tux@slitaz:~$ docker node ls
ID                           HOSTNAME    STATUS  AVAILABILITY  MANAGER STATUS
5f0tcycycbvld9k9o2lw7zkr3    default     Ready   Active       
6l6q31l3ojjanmbrkdsaydcd3    worker2    Down   Active  
7k82hqkla3pfx2l5n1mg86nqz *  slitaz      Ready   Active        Leader
d9acvt55txmtru7kx4c68vj4k    worker3     Ready   Active       
tux@slitaz:~$

tux@slitaz:~$ docker service ps helloworld
ID                         NAME              IMAGE               NODE     DESIRED STATE  CURRENT STATE       ERROR
002tslyqae2iapb6g56fqd7ax  helloworld.1      slitaz/slitaz-base  slitaz   Running        Running 26 minutes ago  
106h3vekgktnm2qhklmh7fu3a  helloworld.2      slitaz/slitaz-base  default  Running        Running 31 seconds ago  
58j491vemqivnwrqaz81pq9nb  \_ helloworld.2   slitaz/slitaz-base  worker2 Shutdown      Running 23 minutes ago  
3t58mrccan0nflvoar6k3ffaq  helloworld.3      slitaz/slitaz-base  default  Running        Running 23 minutes ago  
e54f675l6ur7lc2k4xswltt98  helloworld.4      slitaz/slitaz-base  worker3  Running        Running 23 minutes ago  
dydeu3rwuttjrc6rh8ke3d1hf  helloworld.5      slitaz/slitaz-base  worker3  Running        Running 23 minutes ago  
e8m5wdmesa16pwtme10t1lrju  helloworld.6      slitaz/slitaz-base  slitaz   Running        Running 23 minutes ago  

tux@slitaz:~$ docker service ls
ID            NAME        REPLICAS  IMAGE               COMMAND
cajm42r93yb2  helloworld  6/6       slitaz/slitaz-base  ping docker.com


7. Update the service in the swarm
tux@slitaz:~$ docker service update --replicas 10 helloworld
helloworld

tux@slitaz:~$ docker service ls
ID            NAME        REPLICAS  IMAGE               COMMAND
cajm42r93yb2  helloworld  10/10     slitaz/slitaz-base  ping docker.com

tux@slitaz:~$ docker service ps helloworld
ID                         NAME              IMAGE               NODE     DESIRED STATE  CURRENT STATE       ERROR
002tslyqae2iapb6g56fqd7ax  helloworld.1      slitaz/slitaz-base  slitaz   Running        Running 31 minutes ago  
106h3vekgktnm2qhklmh7fu3a  helloworld.2      slitaz/slitaz-base  default  Running        Running 5  minutes ago   
58j491vemqivnwrqaz81pq9nb  \_ helloworld.2   slitaz/slitaz-base  worker2 Shutdown      Running 28 minutes ago  
3t58mrccan0nflvoar6k3ffaq  helloworld.3      slitaz/slitaz-base  default  Running        Running 28 minutes ago  
e54f675l6ur7lc2k4xswltt98  helloworld.4      slitaz/slitaz-base  worker3  Running        Running 28 minutes ago  
dydeu3rwuttjrc6rh8ke3d1hf  helloworld.5      slitaz/slitaz-base  worker3  Running        Running 28 minutes ago  
e8m5wdmesa16pwtme10t1lrju  helloworld.6      slitaz/slitaz-base  slitaz   Running        Running 28 minutes ago  
8xwx4qqtuelrw6ab1uk6epgoz  helloworld.7      slitaz/slitaz-base  worker3  Running        Running 31 seconds ago  
dzd1fbsvfphkk9z1uik0y87l9  helloworld.8      slitaz/slitaz-base  default  Running        Running 31 seconds ago  
0x5gk6gaggltd25uadol6sf8l  helloworld.9      slitaz/slitaz-base  slitaz   Running        Running 31 seconds ago  
18hngsz3uuzsg7pwe6tyf6jnl  helloworld.10     slitaz/slitaz-base  worker3  Running        Running 30 seconds ago  

tux@slitaz:~$ docker ps
CONTAINER ID        IMAGE                       COMMAND             CREATED             STATUS          PORTS                    NAMES
c1d6ccc0fc66        slitaz/slitaz-base:latest   "ping docker.com"   50 seconds ago      Up 48 seconds                            helloworld.9.0x5gk6gaggltd25uadol6sf8l
98021375dad6        manomarks/visualizer        "npm start"         18 minutes ago      Up 18 minutes   0.0.0.0:8080->8080/tcp   nostalgic_turing
ca20de8a3bca        slitaz/slitaz-base:latest   "ping docker.com"   29 minutes ago      Up 29 minutes                            helloworld.6.e8m5wdmesa16pwtme10t1lrju
871129d798d0        slitaz/slitaz-base:latest   "ping docker.com"   32 minutes ago      Up 32 minutes                            helloworld.1.002tslyqae2iapb6g56fqd7ax
tux@slitaz:~$


8. Delete the service running on the swarm
tux@slitaz:~$ docker service rm helloworld
helloworld

tux@slitaz:~$ docker service ps helloworld
Error: No such service: helloworld


Ref:
swarm mode tutorial
https://docs.docker.com/engine/swarm/swarm-tutorial/




2016-11-17

2016-11-11

Docker-Tag


Docker-Tag


1.
slitaz/slitaz-base
https://hub.docker.com/r/slitaz/slitaz-base/tags/

Tag Name        Compressed Size     Last Updated
2.19            4 MB                3 hours ago
latest          4 MB                3 hours ago
2.13            4 MB                a month ago


2.
tux@slitaz:~$ docker run -it slitaz/slitaz-base:2.13
Unable to find image 'slitaz/slitaz-base:2.13' locally
2.13: Pulling from slitaz/slitaz-base
d1d4bb9c1108: Pull complete
a3ed95caeb02: Pull complete
Digest: sha256:e348a413422a7edd5057ffeeb6dc230fb49c913fee87aa41f1eabed9b3d8688d
Status: Downloaded newer image for slitaz/slitaz-base:2.13

root@09ae98ea7ee0:/# tazpkg -l

List of all installed packages
================================================================================
busybox                 1.21.1            base-system
dialog                  1.1-20110707      base-system
dropbear                2013.60           security
gcc-lib-base            4.6.3             development
gettext-base            0.18.3            base-system
glibc-base              2.13              base-system
nano                    2.2.6             utilities
ncurses                 5.9               base-system
ncurses-common          5.9               base-system
ncursesw                5.9               base-system
retawq                  0.2.6c            network
slitaz-base-files       5.4.2             base-system
slitaz-boot-scripts     5.3.3             base-system
tazpkg                  5.1               base-system
util-linux-blkid        2.21.1            base-system
util-linux-uuid         2.21.1            base-system
ytree                   1.97              utilities
zlib                    1.2.8             base-system
================================================================================
18 packages installed.

root@09ae98ea7ee0:/# /lib64/libc.so.6
GNU C Library stable release version 2.13, by Roland McGrath et al.
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.6.3.
Compiled on a Linux 3.2.14 system on 2013-12-28.

Available extensions:
crypt add-on version 2.1 by Michael Glad and others
GNU Libidn by Simon Josefsson
Native POSIX Threads Library by Ulrich Drepper et al
BIND-8.2.3-T5B
libc ABIs: UNIQUE IFUNC
For bug reporting instructions, please see:
http://www.gnu.org/software/libc/bugs.html

root@09ae98ea7ee0:/# exit
tux@slitaz:~$


3.
tux@slitaz:~$ docker run -it slitaz/slitaz-base:2.19
Unable to find image 'slitaz/slitaz-base:2.19' locally
2.19: Pulling from slitaz/slitaz-base
986f76552751: Pull complete
Digest: sha256:da483e839a6ab53e68c48dab8449b1fb6ad2f6167b5c894fdf3074bca1cca774
Status: Downloaded newer image for slitaz/slitaz-base:2.19

root@2b3c5287b346:/# /lib64/libc.so.6
GNU C Library (GNU libc) stable release version 2.19, by Roland McGrath et al.
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.9.2.
Compiled on a Linux 3.16.36 system on 2016-09-08.

Available extensions:
crypt add-on version 2.1 by Michael Glad and others
GNU Libidn by Simon Josefsson
Native POSIX Threads Library by Ulrich Drepper et al
BIND-8.2.3-T5B
libc ABIs: UNIQUE IFUNC
For bug reporting instructions, please see:
http://www.gnu.org/software/libc/bugs.html

root@2b3c5287b346:/# tazpkg -l

List of all installed packages
================================================================================
busybox                            1.23.2            base-system
gettext-base                       0.19.4            base-system
glibc-base                         2.19              base-system
ncurses-common                     5.9               base-system
slitaz-base-files                  309               base-system
tazpkg                             5.3.3             base-system
================================================================================
6 packages installed.

4.
root@2b3c5287b346:/# exit
tux@slitaz:~$ docker images
REPOSITORY           TAG                 IMAGE ID            CREATED             SIZE
slitaz/slitaz-base   2.19                50236ce3c843        3 hours ago         7.789 MB
slitaz/slitaz-base   latest              50236ce3c843        3 hours ago         7.789 MB
slitaz/slitaz-base   2.13                88ade07d3a4d        19 months ago       8.778 MB
tux@slitaz:~$


2016-11-05

alpine - musl libc - toolchain


alpine
By Docker Official Image

docker pull alpine
https://hub.docker.com/r/library/alpine/


A minimal Docker image based on Alpine Linux with a complete package index and only 5 MB in size!
[..]

What is Alpine Linux?
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.


1.
tux@slitaz:~$ docker search alpine
NAME                           DESCRIPTION                                     STARS     OFFICIAL   AUTOMATED
alpine                         A minimal Docker image based on Alpine Lin...   1532                 [OK]       
anapsix/alpine-java            Oracle Java 8 (and 7) with GLIBC 2.23 over...   155                  [OK]
frolvlad/alpine-glibc          Alpine Docker image with glibc (~12MB)          50                   [OK]
container4armhf/armhf-alpine   Automatically built base images of Alpine ...   33                   [OK]
mhart/alpine-node-auto         Automated build of mhart/alpine-node – a...     31                   [OK]
[..]


2.
tux@slitaz:~$ docker pull alpine
Using default tag: latest
latest: Pulling from library/alpine
3690ec4760f9: Pull complete
Digest: sha256:1354db23ff5478120c980eca1611a51c9f2b88b61f24283ee8200bf9a54f2e5c
Status: Downloaded newer image for alpine:latest

tux@slitaz:~$ docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
alpine              latest              baa5d63471ea        13 days ago         4.803 MB


3.
tux@slitaz:~$ docker run -it alpine
docker: Error response from daemon: No command specified.
See 'docker run --help'.

tux@slitaz:~$ docker run -it alpine /bin/sh
/ # cat /etc/os-release

NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.4.4
PRETTY_NAME="Alpine Linux v3.4"
HOME_URL="http://alpinelinux.org"
BUG_REPORT_URL="http://bugs.alpinelinux.org"

/ # apk -V
apk-tools 2.6.7, compiled for x86_64.


4.
/ # apk info
WARNING: Ignoring APKINDEX.167438ca.tar.gz: No such file or directory
WARNING: Ignoring APKINDEX.a2e6dac0.tar.gz: No such file or directory
musl
busybox
alpine-baselayout
alpine-keys
zlib
libcrypto1.0
libssl1.0
apk-tools
scanelf
musl-utils
libc-utils


/ # apk update
fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/community/x86_64/APKINDEX.tar.gz
v3.4.5 [http://dl-cdn.alpinelinux.org/alpine/v3.4/main]
v3.4.4-21-g75fc217 [http://dl-cdn.alpinelinux.org/alpine/v3.4/community]
OK: 5973 distinct packages available


5.
/ # apk add build-base
(1/21) Upgrading musl (1.1.14-r12 -> 1.1.14-r13)
(2/21) Installing binutils-libs (2.26-r0)
(3/21) Installing binutils (2.26-r0)
(4/21) Installing gmp (6.1.0-r0)
(5/21) Installing isl (0.14.1-r0)
(6/21) Installing libgomp (5.3.0-r0)
(7/21) Installing libatomic (5.3.0-r0)
(8/21) Installing libgcc (5.3.0-r0)
(9/21) Installing pkgconf (0.9.12-r0)
(10/21) Installing pkgconfig (0.25-r1)
(11/21) Installing mpfr3 (3.1.2-r0)
(12/21) Installing mpc1 (1.0.3-r0)
(13/21) Installing libstdc++ (5.3.0-r0)
(14/21) Installing gcc (5.3.0-r0)
(15/21) Installing make (4.1-r1)
(16/21) Installing musl-dev (1.1.14-r13)
(17/21) Installing libc-dev (0.7-r0)
(18/21) Installing fortify-headers (0.8-r0)
(19/21) Installing g++ (5.3.0-r0)
(20/21) Installing build-base (0.4-r1)
(21/21) Upgrading musl-utils (1.1.14-r12 -> 1.1.14-r13)
Executing busybox-1.24.2-r11.trigger
OK: 156 MiB in 30 packages


/ # du -sh /
159.7M /


6.
/ # exit
tux@slitaz:~$ docker ps -a

CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                     PORTS               NAMES
36eda3500249        alpine              "/bin/sh"           17 minutes ago      Exited (0) 7 seconds ago                       gloomy_brattain

tux@slitaz:~$ docker commit 36eda3 alpine-gcc
sha256:d53ed0816906235716b8ce759ba90f8da9875fd44981d673a648edd562bb6d27

tux@slitaz:~$ docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
alpine-gcc          latest              d53ed0816906        6 seconds ago       154 MB
alpine              latest              baa5d63471ea        13 days ago         4.803 MB
tux@slitaz:~$


7.
tux@slitaz:~$ docker run --rm -it alpine-gcc /bin/sh
/ # gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-alpine-linux-musl/5.3.0/lto-wrapper
Target: x86_64-alpine-linux-musl
Configured with: /home/buildozer/aports/main/gcc/src/gcc-5.3.0/configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --build=x86_64-alpine-linux-musl --host=x86_64-alpine-linux-musl --target=x86_64-alpine-linux-musl --with-pkgversion='Alpine 5.3.0' --enable-checking=release --disable-fixed-point --disable-libstdcxx-pch --disable-multilib --disable-nls --disable-werror --disable-symvers --enable-__cxa_atexit --enable-esp --enable-cloog-backend --enable-languages=c,c++,objc,java,fortran,ada --disable-libssp --disable-libmudflap --disable-libsanitizer --enable-shared --enable-threads --enable-tls --with-system-zlib
Thread model: posix
gcc version 5.3.0 (Alpine 5.3.0)


8.
/ # apk info
busybox
alpine-baselayout
alpine-keys
zlib
libcrypto1.0
libssl1.0
apk-tools
scanelf
libc-utils
musl
binutils-libs
binutils
gmp
isl
libgomp
libatomic
libgcc
pkgconf
pkgconfig
mpfr3
mpc1
libstdc++
gcc
make
musl-dev
libc-dev
fortify-headers
g++
build-base
musl-utils


/ # apk info musl
musl-1.1.14-r13 description:
the musl c library (libc) implementation

musl-1.1.14-r13 webpage:
http://www.musl-libc.org/

musl-1.1.14-r13 installed size:
569344


/ # apk info gcc
gcc-5.3.0-r0 description:
The GNU Compiler Collection

gcc-5.3.0-r0 webpage:
http://gcc.gnu.org

gcc-5.3.0-r0 installed size:
65159168


9.
/ # cat /etc/alpine-release
3.4.4

/ # cat /etc/motd
Welcome to Alpine!

The Alpine Wiki contains a large amount of how-to guides and general
information about administrating Alpine systems.
See .

You can setup the system with the command: setup-alpine

You may change this message by editing /etc/motd.

/ #