0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

VyOS 1.5のビルドがocaml、opam周辺で止まったときの対処法

Last updated at Posted at 2025-02-13

はじめに

ルーターのOSは様々であるが、使い慣れたdebianベースのものを使いたくなることがある。

そういった個人的な欲求を満たす方法としてVyOSを使うという選択肢があるが、なぜだか無性にdocker buildをしたくなってしまうものです。

ドキュメントが非常によく整っているので難しくはないものの、一部コードを訂正しないと通らなかったので少し工夫をした点を書き記しておきます。

まず
https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh
vyos-build/o_install.shに保存し、パーミッションを設定する。

次にo_install.shの一部につきコメントアウトや追記をする。

vyos-build/o_install.sh
#   printf "## Where should it be installed ? [%s] " "$DEFAULT_BINDIR"
#   read_tty BINDIR
    BINDIR=/usr/local/bin

また、vyos-build/docker/Dockerfileの一部も次のように書き換える。

vyos-build/docker/Dockerfile
# RUN curl https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh \
#      --output /tmp/opam_install.sh --retry 10 --retry-delay 5 && \
#    sed -i 's/read -r BINDIR/BINDIR=""/' /tmp/opam_install.sh && sh /tmp/opam_install.sh && \

COPY o_install.sh /tmp/o_install.sh
RUN /tmp/o_install.sh

これによりdocker buildが通るようになったかと思われます。

感想

dockerのお勉強ができてよかったです。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?