SlideShare a Scribd company logo
Dockerではまった
吉田@板橋
というかそれ以前の話
Dockerの準備ではまった
2
既存の環境でDockerを使う
• Debian Dockerで検索
– 公式ドキュメントがあった。
– https://docs.docker.com/installation/debian/
– Debian Jessie (Testing)は公式リポジトリにある
• # apt-get install docker.io
– Debian Wheezy(Stable)はbackport+web install
• http://http.debian.net/debian wheezy-backports
– Kernelのupdate(3.2->3.16)
• # curl -sSL https://get.docker.com/ | sh
3
現状の環境
• Debian wheezy@Dell SC440
• 今ならJessieに上げてもいいか。
• JessieへのUpgrade実行
– Debian Wheezy から Jessie にディストリビューショ
ンアップグレードしてみる
• http://matoken.org/blog/blog/2013/05/29/debian-
wheezy2jessie/
– 後で見つけた公式:
• https://www.debian.org/releases/testing/i386/release-
notes/ch-upgrading.ja.html
• 結構時間はかかるが無事終了 4
dockerのパッケージインストール
# apt-get install docker.io
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
aufs-tools cgroupfs-mount git git-man libapparmor1 makedev mountall plymouth
Suggested packages:
btrfs-tools lxc rinse git-daemon-run git-daemon-sysvinit git-doc git-el git-email git-gui
gitk gitweb git-arch git-cvs git-mediawiki git-svn
plymouth-themes
The following NEW packages will be installed:
aufs-tools cgroupfs-mount docker.io git git-man libapparmor1 makedev mountall
plymouth
0 upgraded, 9 newly installed, 0 to remove and 0 not upgraded.
Need to get 3917 kB/8476 kB of archives.
After this operation, 42.3 MB of additional disk space will be used.
問題なし 5
dockerマシン実行
• # docker run -i -t ubuntu /bin/bash
• Unable to find image 'ubuntu' locally
• Pulling repository ubuntu
• 5ba9dab47459: Download complete
• 511136ea3c5a: Download complete
• 27d47432a69b: Download complete
• 5f92234dcf1e: Download complete
• 51a9c7c1f8bb: Download complete
• Status: Downloaded newer image for ubuntu:latest
• Error response from daemon: Cannot start container
67c78ec5687ed515ca6d165380e62c3050e17ef9d04dac58b0532b630c7ad
3f6: exec format error
問題発生 6
いろいろ調べてみた
• service docker stop/start
– etc...
• イメージ削除して再実行
– etc..
• がよく分からん。
7
改めてドキュメントを見る
https://docs.docker.com/installation/debian/
• Debian Jessie 8.0 (64-bit)
• Debian Wheezy/Stable 7.x (64-bit)
...
$ uname -a
Linux sc440 3.16.0-4-686-pae #1 SMP Debian
3.16.7-ckt2-1 (2014-12-08) i686 GNU/Linux
$ uname -m
i686 8
原因判明
• さて、64bit環境に移行するにはどうすればい
いか。
• https://wiki.debian.org/Migrate32To64Bit
9
Migrate32To64Bit
https://wiki.debian.org/Migrate32To64Bit
Migrate a 32-bit debian installation to 64-bit one (i386 to x86_64)
• Check wether your Intel/AMD processor supports the 64-bit "long mode"
• Install a 64-bit kernel
• Create a 64-bit mini system
• Create a list of the 64-bit binaries of the mini system
• Upgrade your 32-bit system closest to the mini system
• Boot your rescue disk
• Overwrite your 32-bit base system
• Reboot to your 64-bit system
• Reinstall all the packages
• Resinstall all remained 32-bit packages
以下250行ほど
大変面倒 10
KernelだけUpdate
• # apt-get install lib64z1 lib64ncurses5 linux-image-amd64
• Reading package lists... Done
• Building dependency tree
• Reading state information... Done
• The following extra packages will be installed:
• lib64tinfo5 libc6-amd64 linux-image-3.16.0-4-amd64
• Suggested packages:
• linux-doc-3.16 debian-kernel-handbook
• The following NEW packages will be installed:
• lib64ncurses5 lib64tinfo5 lib64z1 libc6-amd64 linux-image-3.16.0-4-amd64 linux-image-
amd64
• 0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
• Need to get 36.6 MB of archives.
• After this operation, 173 MB of additional disk space will be used.
• (中略)
• Generating grub configuration file ...
• Found linux image: /boot/vmlinuz-3.16.0-4-686-pae
• Found initrd image: /boot/initrd.img-3.16.0-4-686-pae
• Found linux image: /boot/vmlinuz-3.16.0-4-amd64
• Found initrd image: /boot/initrd.img-3.16.0-4-amd64 11
grubで64bit版Kernelを選んでboot
• # uname -m
• x86_64
• # uname -a
• Linux sc440 3.16.0-4-amd64 #1 SMP Debian
3.16.7-ckt2-1 (2014-12-08) x86_64 GNU/Linux
12
それ以降は
• 面倒なので省略
• Kernelだけ64bit(x86_64)
• Userlandは32bit
# file /bin/ls
/bin/ls: ELF 32-bit LSB executable, Intel 80386,
version 1 (SYSV), dynamically linked (uses
shared libs), for GNU/Linux 2.6.32
13
結果
• # docker run -i -t ubuntu /bin/bash
• root@7144e1a34412:/# cat /etc/lsb-release
• DISTRIB_ID=Ubuntu
• DISTRIB_RELEASE=14.04
• DISTRIB_CODENAME=trusty
• DISTRIB_DESCRIPTION="Ubuntu 14.04.1 LTS"
問題なし
以上14

More Related Content

What's hot

Linux basics
Linux basicsLinux basics
Linux basics
Geeta Vinnakota
 
Rhel7 vs rhel6
Rhel7 vs rhel6Rhel7 vs rhel6
Rhel7 vs rhel6
Arunvignesh Venkatesh
 
Rhel6 vs rhel7
Rhel6 vs rhel7Rhel6 vs rhel7
Rhel6 vs rhel7
Ratna Likhita
 
LSA2 - 02 Namespaces
LSA2 - 02  NamespacesLSA2 - 02  Namespaces
LSA2 - 02 Namespaces
Marian Marinov
 
17 Linux Basics #burningkeyboards
17 Linux Basics #burningkeyboards17 Linux Basics #burningkeyboards
17 Linux Basics #burningkeyboards
Denis Ristic
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
Julio Martinez
 
Basics of Linux
Basics of LinuxBasics of Linux
Basics of Linux
SaifUrRahman180
 
Centos
CentosCentos
Centos
sandyy12
 
Self2013
Self2013Self2013
Self2013
Dru Lavigne
 
Recipe of a linux Live CD (archived)
Recipe of a linux Live CD (archived)Recipe of a linux Live CD (archived)
Recipe of a linux Live CD (archived)
Bud Siddhisena
 
Arch linux
Arch linuxArch linux
Arch linux
Martin Laporga
 
Install hadoop in a cluster
Install hadoop in a clusterInstall hadoop in a cluster
Install hadoop in a clusterXuhong Zhang
 
Docker orchestration using core os and ansible - Ansible IL 2015
Docker orchestration using core os and ansible - Ansible IL 2015Docker orchestration using core os and ansible - Ansible IL 2015
Docker orchestration using core os and ansible - Ansible IL 2015
Leonid Mirsky
 
Linux Introduction
Linux IntroductionLinux Introduction
Linux IntroductionDuy Do Phan
 
Hadoop single cluster installation
Hadoop single cluster installationHadoop single cluster installation
Hadoop single cluster installation
Minh Tran
 
Getting Started on Packaging Apps with Open Build Service
Getting Started on Packaging Apps with Open Build ServiceGetting Started on Packaging Apps with Open Build Service
Getting Started on Packaging Apps with Open Build Service
Andi Sugandi
 

What's hot (20)

Sweden11
Sweden11Sweden11
Sweden11
 
Linux basics
Linux basicsLinux basics
Linux basics
 
Rhel7 vs rhel6
Rhel7 vs rhel6Rhel7 vs rhel6
Rhel7 vs rhel6
 
Run wordcount job (hadoop)
Run wordcount job (hadoop)Run wordcount job (hadoop)
Run wordcount job (hadoop)
 
Rhel6 vs rhel7
Rhel6 vs rhel7Rhel6 vs rhel7
Rhel6 vs rhel7
 
LSA2 - 02 Namespaces
LSA2 - 02  NamespacesLSA2 - 02  Namespaces
LSA2 - 02 Namespaces
 
17 Linux Basics #burningkeyboards
17 Linux Basics #burningkeyboards17 Linux Basics #burningkeyboards
17 Linux Basics #burningkeyboards
 
Apache1.ppt
Apache1.pptApache1.ppt
Apache1.ppt
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Basics of Linux
Basics of LinuxBasics of Linux
Basics of Linux
 
Centos
CentosCentos
Centos
 
Self2013
Self2013Self2013
Self2013
 
Recipe of a linux Live CD (archived)
Recipe of a linux Live CD (archived)Recipe of a linux Live CD (archived)
Recipe of a linux Live CD (archived)
 
Arch linux
Arch linuxArch linux
Arch linux
 
unixtoolbox
unixtoolboxunixtoolbox
unixtoolbox
 
Install hadoop in a cluster
Install hadoop in a clusterInstall hadoop in a cluster
Install hadoop in a cluster
 
Docker orchestration using core os and ansible - Ansible IL 2015
Docker orchestration using core os and ansible - Ansible IL 2015Docker orchestration using core os and ansible - Ansible IL 2015
Docker orchestration using core os and ansible - Ansible IL 2015
 
Linux Introduction
Linux IntroductionLinux Introduction
Linux Introduction
 
Hadoop single cluster installation
Hadoop single cluster installationHadoop single cluster installation
Hadoop single cluster installation
 
Getting Started on Packaging Apps with Open Build Service
Getting Started on Packaging Apps with Open Build ServiceGetting Started on Packaging Apps with Open Build Service
Getting Started on Packaging Apps with Open Build Service
 

Viewers also liked

Unix と windows 世界の融合
Unix と windows 世界の融合Unix と windows 世界の融合
Unix と windows 世界の融合
Satoshi Mimura
 
USB over RDP over SSH
USB over RDP over SSHUSB over RDP over SSH
USB over RDP over SSH
koedoyoshida
 
WHAT_A_KERNEL_IRQL
WHAT_A_KERNEL_IRQLWHAT_A_KERNEL_IRQL
WHAT_A_KERNEL_IRQL
Satoshi Mimura
 
アプリ作者と Windows XP
アプリ作者と Windows XPアプリ作者と Windows XP
アプリ作者と Windows XPSatoshi Mimura
 
APASEC 2013 - ROP/JIT を使わずに DEP/ASLR を回避する手法を見てみた。
APASEC 2013 - ROP/JIT を使わずに DEP/ASLR を回避する手法を見てみた。APASEC 2013 - ROP/JIT を使わずに DEP/ASLR を回避する手法を見てみた。
APASEC 2013 - ROP/JIT を使わずに DEP/ASLR を回避する手法を見てみた。
Satoshi Mimura
 
マルウェア通信検知手法におけるUser-Agentの有効性の一考察
マルウェア通信検知手法におけるUser-Agentの有効性の一考察マルウェア通信検知手法におけるUser-Agentの有効性の一考察
マルウェア通信検知手法におけるUser-Agentの有効性の一考察
Recruit Technologies
 
3本指ジェスチャでの 仮想デスクトップ機能を Windows に実装した話
3本指ジェスチャでの仮想デスクトップ機能を Windows に実装した話3本指ジェスチャでの仮想デスクトップ機能を Windows に実装した話
3本指ジェスチャでの 仮想デスクトップ機能を Windows に実装した話
Satoshi Mimura
 
Visual Studio で TeX 編集
Visual Studio で TeX 編集Visual Studio で TeX 編集
Visual Studio で TeX 編集
Satoshi Mimura
 
Edomae 2015 - マルウェアを解析してみよう
Edomae 2015 - マルウェアを解析してみようEdomae 2015 - マルウェアを解析してみよう
Edomae 2015 - マルウェアを解析してみよう
Satoshi Mimura
 
セキュリティとAI
 -最後にヘヴィメタルとAI-
セキュリティとAI
 -最後にヘヴィメタルとAI-セキュリティとAI
 -最後にヘヴィメタルとAI-
セキュリティとAI
 -最後にヘヴィメタルとAI-
Typhon 666
 
Docker入門-基礎編 いまから始めるDocker管理【2nd Edition】
Docker入門-基礎編 いまから始めるDocker管理【2nd Edition】Docker入門-基礎編 いまから始めるDocker管理【2nd Edition】
Docker入門-基礎編 いまから始めるDocker管理【2nd Edition】
Masahito Zembutsu
 

Viewers also liked (11)

Unix と windows 世界の融合
Unix と windows 世界の融合Unix と windows 世界の融合
Unix と windows 世界の融合
 
USB over RDP over SSH
USB over RDP over SSHUSB over RDP over SSH
USB over RDP over SSH
 
WHAT_A_KERNEL_IRQL
WHAT_A_KERNEL_IRQLWHAT_A_KERNEL_IRQL
WHAT_A_KERNEL_IRQL
 
アプリ作者と Windows XP
アプリ作者と Windows XPアプリ作者と Windows XP
アプリ作者と Windows XP
 
APASEC 2013 - ROP/JIT を使わずに DEP/ASLR を回避する手法を見てみた。
APASEC 2013 - ROP/JIT を使わずに DEP/ASLR を回避する手法を見てみた。APASEC 2013 - ROP/JIT を使わずに DEP/ASLR を回避する手法を見てみた。
APASEC 2013 - ROP/JIT を使わずに DEP/ASLR を回避する手法を見てみた。
 
マルウェア通信検知手法におけるUser-Agentの有効性の一考察
マルウェア通信検知手法におけるUser-Agentの有効性の一考察マルウェア通信検知手法におけるUser-Agentの有効性の一考察
マルウェア通信検知手法におけるUser-Agentの有効性の一考察
 
3本指ジェスチャでの 仮想デスクトップ機能を Windows に実装した話
3本指ジェスチャでの仮想デスクトップ機能を Windows に実装した話3本指ジェスチャでの仮想デスクトップ機能を Windows に実装した話
3本指ジェスチャでの 仮想デスクトップ機能を Windows に実装した話
 
Visual Studio で TeX 編集
Visual Studio で TeX 編集Visual Studio で TeX 編集
Visual Studio で TeX 編集
 
Edomae 2015 - マルウェアを解析してみよう
Edomae 2015 - マルウェアを解析してみようEdomae 2015 - マルウェアを解析してみよう
Edomae 2015 - マルウェアを解析してみよう
 
セキュリティとAI
 -最後にヘヴィメタルとAI-
セキュリティとAI
 -最後にヘヴィメタルとAI-セキュリティとAI
 -最後にヘヴィメタルとAI-
セキュリティとAI
 -最後にヘヴィメタルとAI-
 
Docker入門-基礎編 いまから始めるDocker管理【2nd Edition】
Docker入門-基礎編 いまから始めるDocker管理【2nd Edition】Docker入門-基礎編 いまから始めるDocker管理【2nd Edition】
Docker入門-基礎編 いまから始めるDocker管理【2nd Edition】
 

Similar to Dockerの準備

LXC
LXCLXC
CentOS Stream at Facebook
CentOS Stream at FacebookCentOS Stream at Facebook
CentOS Stream at Facebook
Davide Cavalca
 
02 Hadoop deployment and configuration
02 Hadoop deployment and configuration02 Hadoop deployment and configuration
02 Hadoop deployment and configuration
Subhas Kumar Ghosh
 
Building Mini Embedded Linux System for X86 Arch
Building Mini Embedded Linux System for X86 ArchBuilding Mini Embedded Linux System for X86 Arch
Building Mini Embedded Linux System for X86 Arch
Sherif Mousa
 
Test complex database systems in your laptop with dbdeployer
Test complex database systems in your laptop with dbdeployerTest complex database systems in your laptop with dbdeployer
Test complex database systems in your laptop with dbdeployer
Giuseppe Maxia
 
Stateless Hypervisors at Scale
Stateless Hypervisors at ScaleStateless Hypervisors at Scale
Stateless Hypervisors at Scale
Antony Messerl
 
Generating a Reproducible and Maintainable Embedded Linux Environment with Po...
Generating a Reproducible and Maintainable Embedded Linux Environment with Po...Generating a Reproducible and Maintainable Embedded Linux Environment with Po...
Generating a Reproducible and Maintainable Embedded Linux Environment with Po...
LF Events
 
docker build with Ansible
docker build with Ansibledocker build with Ansible
docker build with Ansible
Bas Meijer
 
Msu free bsd
Msu   free bsdMsu   free bsd
Msu free bsd
vipul08591
 
Building community with CentOS Stream
Building community with CentOS StreamBuilding community with CentOS Stream
Building community with CentOS Stream
Davide Cavalca
 
Deploying to Ubuntu on Linode
Deploying to Ubuntu on LinodeDeploying to Ubuntu on Linode
Deploying to Ubuntu on Linode
WO Community
 
Rasperry Pi and TI CC2650 IPv6 border router
Rasperry Pi and TI CC2650 IPv6 border routerRasperry Pi and TI CC2650 IPv6 border router
Rasperry Pi and TI CC2650 IPv6 border router
Nikolaos Monios
 
Docker and the Linux Kernel
Docker and the Linux KernelDocker and the Linux Kernel
Docker and the Linux Kernel
Docker, Inc.
 
High performance content hosting
High performance content hosting High performance content hosting
High performance content hosting
Aleksey Korzun
 
Java developer intro to environment management with vagrant puppet and docker
Java developer intro to environment management with vagrant puppet and dockerJava developer intro to environment management with vagrant puppet and docker
Java developer intro to environment management with vagrant puppet and docker
Getting value from IoT, Integration and Data Analytics
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
Walter Liu
 
CentOS at Facebook
CentOS at FacebookCentOS at Facebook
CentOS at Facebook
Phil Dibowitz
 
Docker and the Container Ecosystem
Docker and the Container EcosystemDocker and the Container Ecosystem
Docker and the Container Ecosystem
psconnolly
 

Similar to Dockerの準備 (20)

LXC
LXCLXC
LXC
 
CentOS Stream at Facebook
CentOS Stream at FacebookCentOS Stream at Facebook
CentOS Stream at Facebook
 
02 Hadoop deployment and configuration
02 Hadoop deployment and configuration02 Hadoop deployment and configuration
02 Hadoop deployment and configuration
 
Building Mini Embedded Linux System for X86 Arch
Building Mini Embedded Linux System for X86 ArchBuilding Mini Embedded Linux System for X86 Arch
Building Mini Embedded Linux System for X86 Arch
 
Test complex database systems in your laptop with dbdeployer
Test complex database systems in your laptop with dbdeployerTest complex database systems in your laptop with dbdeployer
Test complex database systems in your laptop with dbdeployer
 
Stateless Hypervisors at Scale
Stateless Hypervisors at ScaleStateless Hypervisors at Scale
Stateless Hypervisors at Scale
 
Generating a Reproducible and Maintainable Embedded Linux Environment with Po...
Generating a Reproducible and Maintainable Embedded Linux Environment with Po...Generating a Reproducible and Maintainable Embedded Linux Environment with Po...
Generating a Reproducible and Maintainable Embedded Linux Environment with Po...
 
docker build with Ansible
docker build with Ansibledocker build with Ansible
docker build with Ansible
 
Msu free bsd
Msu   free bsdMsu   free bsd
Msu free bsd
 
Rally_Docker_deployment_JumpVM
Rally_Docker_deployment_JumpVMRally_Docker_deployment_JumpVM
Rally_Docker_deployment_JumpVM
 
Building community with CentOS Stream
Building community with CentOS StreamBuilding community with CentOS Stream
Building community with CentOS Stream
 
Deploying to Ubuntu on Linode
Deploying to Ubuntu on LinodeDeploying to Ubuntu on Linode
Deploying to Ubuntu on Linode
 
Rasperry Pi and TI CC2650 IPv6 border router
Rasperry Pi and TI CC2650 IPv6 border routerRasperry Pi and TI CC2650 IPv6 border router
Rasperry Pi and TI CC2650 IPv6 border router
 
Docker and the Linux Kernel
Docker and the Linux KernelDocker and the Linux Kernel
Docker and the Linux Kernel
 
Lab docker
Lab dockerLab docker
Lab docker
 
High performance content hosting
High performance content hosting High performance content hosting
High performance content hosting
 
Java developer intro to environment management with vagrant puppet and docker
Java developer intro to environment management with vagrant puppet and dockerJava developer intro to environment management with vagrant puppet and docker
Java developer intro to environment management with vagrant puppet and docker
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
CentOS at Facebook
CentOS at FacebookCentOS at Facebook
CentOS at Facebook
 
Docker and the Container Ecosystem
Docker and the Container EcosystemDocker and the Container Ecosystem
Docker and the Container Ecosystem
 

More from koedoyoshida

Webcam reset-automation
Webcam reset-automationWebcam reset-automation
Webcam reset-automation
koedoyoshida
 
Inside PyCon JP 2016
Inside PyCon JP 2016Inside PyCon JP 2016
Inside PyCon JP 2016
koedoyoshida
 
インフラエンジニアのためのプレゼン技術
インフラエンジニアのためのプレゼン技術インフラエンジニアのためのプレゼン技術
インフラエンジニアのためのプレゼン技術
koedoyoshida
 
艦これタイマーシリーズご紹介
艦これタイマーシリーズご紹介艦これタイマーシリーズご紹介
艦これタイマーシリーズご紹介
koedoyoshida
 
Pycon JP 2014の裏側
Pycon JP 2014の裏側Pycon JP 2014の裏側
Pycon JP 2014の裏側
koedoyoshida
 
Indentとの戦い-艦これOSS便利ツールの紹介-
Indentとの戦い-艦これOSS便利ツールの紹介-Indentとの戦い-艦これOSS便利ツールの紹介-
Indentとの戦い-艦これOSS便利ツールの紹介-
koedoyoshida
 
艦これタイマー for firefox addonの拡張
艦これタイマー for firefox addonの拡張艦これタイマー for firefox addonの拡張
艦これタイマー for firefox addonの拡張
koedoyoshida
 
Hatohol introduction-20130830-hbstudy
Hatohol introduction-20130830-hbstudyHatohol introduction-20130830-hbstudy
Hatohol introduction-20130830-hbstudy
koedoyoshida
 
Hatohol technical-brief-20130830-hbstudy
Hatohol technical-brief-20130830-hbstudyHatohol technical-brief-20130830-hbstudy
Hatohol technical-brief-20130830-hbstudy
koedoyoshida
 
Lvmを縮小してみた
Lvmを縮小してみたLvmを縮小してみた
Lvmを縮小してみたkoedoyoshida
 
Monitでfirefoxを監視してみた
Monitでfirefoxを監視してみたMonitでfirefoxを監視してみた
Monitでfirefoxを監視してみたkoedoyoshida
 

More from koedoyoshida (11)

Webcam reset-automation
Webcam reset-automationWebcam reset-automation
Webcam reset-automation
 
Inside PyCon JP 2016
Inside PyCon JP 2016Inside PyCon JP 2016
Inside PyCon JP 2016
 
インフラエンジニアのためのプレゼン技術
インフラエンジニアのためのプレゼン技術インフラエンジニアのためのプレゼン技術
インフラエンジニアのためのプレゼン技術
 
艦これタイマーシリーズご紹介
艦これタイマーシリーズご紹介艦これタイマーシリーズご紹介
艦これタイマーシリーズご紹介
 
Pycon JP 2014の裏側
Pycon JP 2014の裏側Pycon JP 2014の裏側
Pycon JP 2014の裏側
 
Indentとの戦い-艦これOSS便利ツールの紹介-
Indentとの戦い-艦これOSS便利ツールの紹介-Indentとの戦い-艦これOSS便利ツールの紹介-
Indentとの戦い-艦これOSS便利ツールの紹介-
 
艦これタイマー for firefox addonの拡張
艦これタイマー for firefox addonの拡張艦これタイマー for firefox addonの拡張
艦これタイマー for firefox addonの拡張
 
Hatohol introduction-20130830-hbstudy
Hatohol introduction-20130830-hbstudyHatohol introduction-20130830-hbstudy
Hatohol introduction-20130830-hbstudy
 
Hatohol technical-brief-20130830-hbstudy
Hatohol technical-brief-20130830-hbstudyHatohol technical-brief-20130830-hbstudy
Hatohol technical-brief-20130830-hbstudy
 
Lvmを縮小してみた
Lvmを縮小してみたLvmを縮小してみた
Lvmを縮小してみた
 
Monitでfirefoxを監視してみた
Monitでfirefoxを監視してみたMonitでfirefoxを監視してみた
Monitでfirefoxを監視してみた
 

Dockerの準備

  • 3. 既存の環境でDockerを使う • Debian Dockerで検索 – 公式ドキュメントがあった。 – https://docs.docker.com/installation/debian/ – Debian Jessie (Testing)は公式リポジトリにある • # apt-get install docker.io – Debian Wheezy(Stable)はbackport+web install • http://http.debian.net/debian wheezy-backports – Kernelのupdate(3.2->3.16) • # curl -sSL https://get.docker.com/ | sh 3
  • 4. 現状の環境 • Debian wheezy@Dell SC440 • 今ならJessieに上げてもいいか。 • JessieへのUpgrade実行 – Debian Wheezy から Jessie にディストリビューショ ンアップグレードしてみる • http://matoken.org/blog/blog/2013/05/29/debian- wheezy2jessie/ – 後で見つけた公式: • https://www.debian.org/releases/testing/i386/release- notes/ch-upgrading.ja.html • 結構時間はかかるが無事終了 4
  • 5. dockerのパッケージインストール # apt-get install docker.io Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: aufs-tools cgroupfs-mount git git-man libapparmor1 makedev mountall plymouth Suggested packages: btrfs-tools lxc rinse git-daemon-run git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-arch git-cvs git-mediawiki git-svn plymouth-themes The following NEW packages will be installed: aufs-tools cgroupfs-mount docker.io git git-man libapparmor1 makedev mountall plymouth 0 upgraded, 9 newly installed, 0 to remove and 0 not upgraded. Need to get 3917 kB/8476 kB of archives. After this operation, 42.3 MB of additional disk space will be used. 問題なし 5
  • 6. dockerマシン実行 • # docker run -i -t ubuntu /bin/bash • Unable to find image 'ubuntu' locally • Pulling repository ubuntu • 5ba9dab47459: Download complete • 511136ea3c5a: Download complete • 27d47432a69b: Download complete • 5f92234dcf1e: Download complete • 51a9c7c1f8bb: Download complete • Status: Downloaded newer image for ubuntu:latest • Error response from daemon: Cannot start container 67c78ec5687ed515ca6d165380e62c3050e17ef9d04dac58b0532b630c7ad 3f6: exec format error 問題発生 6
  • 7. いろいろ調べてみた • service docker stop/start – etc... • イメージ削除して再実行 – etc.. • がよく分からん。 7
  • 8. 改めてドキュメントを見る https://docs.docker.com/installation/debian/ • Debian Jessie 8.0 (64-bit) • Debian Wheezy/Stable 7.x (64-bit) ... $ uname -a Linux sc440 3.16.0-4-686-pae #1 SMP Debian 3.16.7-ckt2-1 (2014-12-08) i686 GNU/Linux $ uname -m i686 8
  • 10. Migrate32To64Bit https://wiki.debian.org/Migrate32To64Bit Migrate a 32-bit debian installation to 64-bit one (i386 to x86_64) • Check wether your Intel/AMD processor supports the 64-bit "long mode" • Install a 64-bit kernel • Create a 64-bit mini system • Create a list of the 64-bit binaries of the mini system • Upgrade your 32-bit system closest to the mini system • Boot your rescue disk • Overwrite your 32-bit base system • Reboot to your 64-bit system • Reinstall all the packages • Resinstall all remained 32-bit packages 以下250行ほど 大変面倒 10
  • 11. KernelだけUpdate • # apt-get install lib64z1 lib64ncurses5 linux-image-amd64 • Reading package lists... Done • Building dependency tree • Reading state information... Done • The following extra packages will be installed: • lib64tinfo5 libc6-amd64 linux-image-3.16.0-4-amd64 • Suggested packages: • linux-doc-3.16 debian-kernel-handbook • The following NEW packages will be installed: • lib64ncurses5 lib64tinfo5 lib64z1 libc6-amd64 linux-image-3.16.0-4-amd64 linux-image- amd64 • 0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded. • Need to get 36.6 MB of archives. • After this operation, 173 MB of additional disk space will be used. • (中略) • Generating grub configuration file ... • Found linux image: /boot/vmlinuz-3.16.0-4-686-pae • Found initrd image: /boot/initrd.img-3.16.0-4-686-pae • Found linux image: /boot/vmlinuz-3.16.0-4-amd64 • Found initrd image: /boot/initrd.img-3.16.0-4-amd64 11
  • 12. grubで64bit版Kernelを選んでboot • # uname -m • x86_64 • # uname -a • Linux sc440 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt2-1 (2014-12-08) x86_64 GNU/Linux 12
  • 13. それ以降は • 面倒なので省略 • Kernelだけ64bit(x86_64) • Userlandは32bit # file /bin/ls /bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32 13
  • 14. 結果 • # docker run -i -t ubuntu /bin/bash • root@7144e1a34412:/# cat /etc/lsb-release • DISTRIB_ID=Ubuntu • DISTRIB_RELEASE=14.04 • DISTRIB_CODENAME=trusty • DISTRIB_DESCRIPTION="Ubuntu 14.04.1 LTS" 問題なし 以上14