
私は、管理しているRStudioイメージを更新するためにpackerを使用しています(https://marketplace.digitalocean.com/apps/rstudio)、これは私がコミュニティのために行っていることです。パイプラインの最初のスクリプトは次のコードで始まります。
#!/bin/bash
# non-interactive install
DEBIAN_FRONTEND=noninteractive
# Add a swap file to prevent build time OOM errors
fallocate -l 8G /swapfile
mkswap /swapfile
swapon /swapfile
# add CRAN to apt sources
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
printf '\n#CRAN mirror\ndeb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/\n' | tee -a /etc/apt/sources.list
# update apt
apt-get -qqy -o Dpkg::Options::=--force-confdef update
apt-get -qqy -o Dpkg::Options::=--force-confdef upgrade
ただし、packer build conf.json
プロセスを実行すると、openssh-server が非対話型構成を無視するため失敗し、スクリプトはここで停止します。
digitalocean: A new version (/tmp/fileVGUVsU) of configuration file /etc/ssh/sshd_config is
digitalocean: available, but the version installed currently has been locally modified.
digitalocean:
digitalocean: 1. install the package maintainer's version
digitalocean: 2. keep the local version currently installed
digitalocean: 3. show the differences between the versions
digitalocean: 4. show a side-by-side difference between the versions
digitalocean: 5. show a 3-way difference between available versions
digitalocean: 6. do a 3-way merge between available versions
digitalocean: 7. start a new shell to examine the situation
常に最初のオプションを選択するにはどうすればよいですか? 見つけられる関連投稿はすべて読みました。