Docker を管理する Webアプリ Portainer を Docker Compose で起動する

Portainer

これです。

Shipyard という素敵なプロダクトがあったのですが、そちらが終了のためにこちらへの移行がなされています。

結論

以下のような docker-compose.yml になります。

version: '2'

services:
  portainer:
    container_name: my-portainer
    hostname: my_portainer
    image: portainer/portainer
    ports:
      - "12345:9000"
    command: -H unix:///var/run/docker.sock
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - data:/data
    restart: always

volumes:
  data:
続きを読む

Ubuntu で pyenv で Python を ビルド しようとしたら bz2 と sqlite3 がないと怒られたとき

状況

以下のような状況です。

$ pyenv install 3.7.0
Downloading Python-3.7.0.tar.xz...
-> https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tar.xz
Installing Python-3.7.0...
WARNING: The Python bz2 extension was not compiled. Missing the bzip2 lib?
WARNING: The Python sqlite3 extension was not compiled. Missing the SQLite3 lib?

結論

$ sudo apt install -y libbz2-dev libsqlite3-dev

理由

  • WARNING: The Python bz2 extension was not compiled. Missing the bzip2 lib? の方は libbz2-dev を入れればよいからです
  • WARNING: The Python sqlite3 extension was not compiled. Missing the SQLite3 lib? の方は libsqlite3-dev を入れればよいからです

補足

libreadline-dev が入っていないと WARNING: The Python readline extension was not compiled. Missing the GNU readline lib? と怒られるので、この場合も以下のようにして入れておきます。

$ sudo apt install -y libreadline-dev
Powered by はてなブログ