What is the alpine linux equivalent to ubuntu tempfile? - temporary-files

What's the alpine linux equivalent to ubuntu's tempfile?

Turns out that tempfile is deprecated in favor of mktemp, based on this SO answer

Related

What is the exact version of docker-compose to use with docker 1.7.0?

I am trying to run docker 1.7.0 in CentOS 6. I tried using docker-compose 1.12.0 but
got this "Error:client and server don't have same version(client API version:122, server API version:1.19). So I am trying to find out which docker-compose version support in my case.
Other info:
OS: Centos 6.10
Kernel:2.6.32
Docker client/server version:1.7.0
Docker client/server API version :1.19
I got the answer it is docker-compose 1.4.0.

Creating container image of old Centos

I need to create Centos 6.9 32bit system image. I found manual how to do that which contains link to script.
I suppose for this reason I need to run Centos 6.9 32bit, install docker in it and then run script.
Trying to install docker in Centos 6.9 and. Found that it is not possible to install on this system according to requarements in manual:
OS requirements
To install Docker CE, you need a maintained version of CentOS 7
How to create container for of old Centos 6.9 ?
There is already an official CentOS 6 32-bit image in Docker Hub, so you might not need to create your own. It can run on an x64 host.
There is no centos:6.9 tag but a quick test of the centos:6 tag shows that it is 6.9 anyway:
$ docker pull i386/centos:6
6: Pulling from i386/centos
6fe27d5f397b: Pull complete
Digest: sha256:af47b24bee01b29f3c86e484b716651f89c93d8ca73d88c1a74019c691e0d1e2
Status: Downloaded newer image for i386/centos:6
$ docker run -it i386/centos:6 bash
[root#508467e5637e /]# cat /etc/redhat-release
CentOS release 6.9 (Final)
Update
I see from your previous question that you had already found the official 32-bit CentOS 6 image but want it to run on a 32-bit host kernel.
According to the docker installation prerequisites, it needs a 64-bit host. Docker does have 32-bit packages but they only contain the docker client and not the daemon.
If you want to run a 32-bit version of the docker-daemon, you could try following this blog post which describes how to build it from source.

How to know if you have Docker Version, 1.13?

How do you know if you have Docker Version 1.13 or higher? My Client/Server version is : 1.6.2 and Client/Server API version is: 1.18. This makes me think I have a version above 1.13; however, I don't have the functionality of Docker 1.13. i.e. I can't use "docker stack deploy" or "docker container".
You can in terminal run command docker --version

How to downgrade version of docker used by docker-machine and boot2docker?

I am using docker-machine on OS:X. I would like to install Docker 1.11.2 into my boot2docker machine, however it looks like the combination of docker-machine and boot2docker are always pulling the latest release of boot2docker.
I have tried replacing ~/.docker/machine/machines/default/boot2docker.iso with a manually downloaded iso matching 1.11.2, however this doesn't seem to actually change the version of docker.
I do not see anything listed in docker-machine documentation which suggests it to be possible to specify which iso or version of docker to use when creating the virtualmachine. I am using VirtualBox as driver.
How can I either downgrade the version of docker installed in my virtual machine or create a new one with a specific version installed?
When creating a new machine it is possible to specify where to get the boot2docker ISO from using the --virtualbox-boot2docker-url option. When doing that it will refrain from upgrading the machine to the latest version.
Example:
docker-machine create \
--driver virtualbox \
--virtualbox-memory 6144 \
--virtualbox-hostonly-cidr "10.10.10.1/24" \
--virtualbox-cpu-count "2" \
--virtualbox-disk-size "20000" \
--virtualbox-boot2docker-url https://github.com/boot2docker/boot2docker/releases/download/v1.12.2/boot2docker.iso \
default
It looks like there are two steps that need to happen to fully downgrade docker-machine.
First, download and replacing the boot2docker.iso file located at ~/.docker/machine/cache/boot2docker.iso. When you create a new docker-machine, it defaults to using the cached iso. Manually replacing it with whatever version iso you want is required.
This will then cause docker-machine to create the VM with the appropriate version of docker.
However, you also need to download a new version of docker toolbox in order to have the previous version for the client, as well. I am not sure how to navigate to older versions than the linked (1.11.2) but you can change the download url to whatever version you want and it seems some of them are still hosted.
Run the following following steps:
Check your docker version:
$ docker -v
Docker version 18.03.0-ce, build 0520e24
Download your docker version's of boot2docker (18.03.0-ce) from here into your local:
wget https://github.com/boot2docker/boot2docker/releases/download/v18.03.0-ce/boot2docker.iso -P ~/.docker/machine/cache/test/boot2docker-v18-03-0-ce.iso
Create the new_virtual_box_name using the downloaded version of boot2docker:
docker-machine create --driver virtualbox --virtualbox-boot2docker-url ~/.docker/machine/cache/test/boot2docker-v18-03-0-ce.iso new_virtual_box_name

Running docker Ubuntu image on Debian environment

Just started using Docker and have some questions regarding linux containers.
How can I run Ubuntu images on a Debian host? Or it is just a name of image called 'Ubuntu' that actually use Debian environment?
# cat /proc/version
Linux version 3.16.0-0.bpo.4-amd64 (debian-kernel#lists.debian.org) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 SMP Debian 3.16.7-ckt2-1~bpo70+1 (2014-12-08)
# docker run -i -t ubuntu
root#bcade5ce3b94:/# cat /proc/version
Linux version 3.16.0-0.bpo.4-amd64 (debian-kernel#lists.debian.org) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 SMP Debian 3.16.7-ckt2-1~bpo70+1 (2014-12-08)
What about the filesystem? Does it use the same installed components or a new fs architecture that just depends on the kernel?
Maybe there is some good articles about the subject you can share.
In docker all images use the same kernel - that is why overhead is minimal - virtualization layer is very thin. All files in ubuntu image from ubuntu, but any image will give you the same output of uname -a, as it is the same kernel.
$ docker run --rm -ti ubuntu
root#318f07af2ca7:/# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.1 LTS"
You don't see host filesystem inside of container unless you will map some directory. The idea of container that it is running in the same way on any host - doesn't matter what installed there - you need only docker.

Resources