# Docker [TOC] ## 参考元 - [https://qiita.com/pottava/items/452bf80e334bc1fee69a#dockerfile-ベストプラクティス](https://qiita.com/pottava/items/452bf80e334bc1fee69a#dockerfile-%E3%83%99%E3%82%B9%E3%83%88%E3%83%97%E3%83%A9%E3%82%AF%E3%83%86%E3%82%A3%E3%82%B9) ## メモ ### コンテナ内で作業してみる - ベースの Docker イメージ: Ubuntu ``` $ docker run -it ubuntu /bin/bash $ apt update $ apt install -y bubblewrap build-essential curl git m4 unzip ``` - opam のインストール ``` $ sh -c "$(curl -sL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)" $ opam init -y --disable-sandboxing $ eval $(opam env --switch=default) ``` - cameleer のインストール ``` $ git clone https://github.com/yuyaha/cameleer.git ``` - ocaml のインストール ``` $ cd cameleer $ opam switch create . $ eval $(opam env) ``` - z3 のインストール ``` $ opam install z3 $ eval $(opam env) ``` - why3 に z3 を追加 ``` $ why3 config detect ``` - 実行 ``` $ cameleer smartcontracts/boomerang.ml → anomaly: Gtk.Error("GtkMain.init: initialization failed\nml_gtk_init: initialization failed") ``` ↑ ホスト側で`.X11`の設定が必要かもしれません。 https://gist.github.com/cschiewek/246a244ba23da8b9f0e7b11a68bf3285