Windows7上のVirtualBoxにalpinelinuxをインストールしてdockerを動かすまで


環境

  • widows7 professional 64bit
  • virtual box 5.2.6 r120293

VMの作成

alpinelinuxのインストール

alpinelinuxのセットアップ(ベース)

alpine-setup

  • sda
  • sys

共有フォルダ

ssh

  • /etc/ssh/sshd_conf
  • /etc/ssh/ssh_conf を編集してはまる
# ssh [email protected]
/etc/ssh/ssh_config: line 47: Bad configuration option: permitrootlogin
/etc/ssh/ssh_config: line termination, 1 bad configuration options

ホスト(windows)からのssh

  • teratermでブリッジアダプタにssh接続
    • 「OK」押下するが、無反応
  • NATアダプタにポートフォワード設定追加
    • 接続できた
Welcome to Alpine!

The Alpine Wiki contains a large amount of how-to guides and general
information about administrating Alpine systems.
See <http://wiki.alpinelinux.org>.

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

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

localhost:~#  
  • virtualboxのbootの優先順位でHDDを優先させる

alpinelinuxのセットアップ(docker)

docker-compose

# apk add docker-compose
fetch http://mirrors.ustc.edu.cn/alpine/v3.8/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
(1/29) Installing gdbm (1.13-r1)
(2/29) Installing readline (7.0.003-r1)
(3/29) Installing sqlite-libs (3.24.0-r1)
(4/29) Installing python3 (3.6.7-r0)
(5/29) Installing py3-setuptools (40.6.2-r0)
(6/29) Installing py3-six (1.11.0-r0)
(7/29) Installing dockerpy-creds (0.3.0-r0)
(8/29) Installing py3-cparser (2.18-r0)
(9/29) Installing py3-cffi (1.11.5-r0)
(10/29) Installing py3-idna (2.7-r0)
(11/29) Installing py3-asn1crypto (0.24.0-r0)
(12/29) Installing py3-cryptography (2.4.2-r0)
(13/29) Installing py3-ipaddress (1.0.22-r0)
(14/29) Installing py3-parsing (2.2.0-r0)
(15/29) Installing py3-packaging (17.1-r0)
(16/29) Installing py3-chardet (3.0.4-r0)
(17/29) Installing py3-certifi (2018.4.16-r0)
(18/29) Installing py3-urllib3 (1.22-r0)
(19/29) Installing py3-requests (2.19.1-r0)
(20/29) Installing py3-websocket-client (0.54.0-r0)
(21/29) Installing docker-py (3.6.0-r0)
(22/29) Installing py3-cached-property (1.4.3-r0)
(23/29) Installing py3-dockerpty (0.4.1-r0)
(24/29) Installing py3-docopt (0.6.2-r2)
(25/29) Installing py3-jsonschema (2.6.0-r0)
(26/29) Installing py3-pysocks (1.6.8-r0)
(27/29) Installing py3-texttable (1.4.0-r0)
(28/29) Installing py3-yaml (4.1-r0)
(29/29) Installing docker-compose (1.22.0-r0)
Executing busybox-1.29.3-r4.trigger
OK: 837 MiB in 215 packages

alpinelinuxのセットアップ(redis)

apk add redis

これでredis(4.0.11)がインストールされた

# redis-server -v
Redis server v=4.0.11 sha=bca38d14:0 malloc=libc bits=64 build=3b8edec96d6a5c19
# redis-cli -v
redis-cli 4.0.11 (git:bca38d14)

pure-ftp

samba

apk add samba
/etc/samba/smb.conf
[Share]
        comment = Share Folder for All Users
        guest ok = Yes
        path = /home/share/
        read only = No
pdbedit -a hoge