diff options
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | Vagrantfile | 95 | ||||
| -rw-r--r-- | docs/_summary.md | 1 | ||||
| -rw-r--r-- | docs/getting_started_vagrant.md | 56 | ||||
| -rw-r--r-- | docs/ja/_summary.md | 1 | ||||
| -rw-r--r-- | docs/ja/getting_started_vagrant.md | 61 | ||||
| -rw-r--r-- | docs/zh-cn/_summary.md | 3 | ||||
| -rw-r--r-- | docs/zh-cn/getting_started_vagrant.md | 61 | ||||
| -rw-r--r-- | util/vagrant/Dockerfile | 33 | ||||
| -rw-r--r-- | util/vagrant/readme.md | 12 |
10 files changed, 1 insertions, 323 deletions
diff --git a/.gitignore b/.gitignore index e36b9ae130..a2456aef1b 100644 --- a/.gitignore +++ b/.gitignore | |||
| @@ -45,7 +45,6 @@ quantum/version.h | |||
| 45 | .idea/ | 45 | .idea/ |
| 46 | .project | 46 | .project |
| 47 | .settings/ | 47 | .settings/ |
| 48 | .vagrant/ | ||
| 49 | 48 | ||
| 50 | # ? | 49 | # ? |
| 51 | .dep | 50 | .dep |
diff --git a/Vagrantfile b/Vagrantfile deleted file mode 100644 index 717f4ec98b..0000000000 --- a/Vagrantfile +++ /dev/null | |||
| @@ -1,95 +0,0 @@ | |||
| 1 | # -*- mode: ruby -*- | ||
| 2 | # vi: set ft=ruby : | ||
| 3 | |||
| 4 | Vagrant.configure(2) do |config| | ||
| 5 | # define a name instead of just 'default' | ||
| 6 | config.vm.define "qmk_firmware" | ||
| 7 | |||
| 8 | # VMware/Virtualbox ( and also Hyperv/Parallels) 64 bit | ||
| 9 | config.vm.box = "generic/debian10" | ||
| 10 | |||
| 11 | config.vm.synced_folder '.', '/vagrant' | ||
| 12 | |||
| 13 | # This section allows you to customize the Virtualbox VM | ||
| 14 | # settings, ie showing the GUI or upping the memory | ||
| 15 | # or cores if desired | ||
| 16 | config.vm.provider "virtualbox" do |vb| | ||
| 17 | # Hide the VirtualBox GUI when booting the machine | ||
| 18 | vb.gui = false | ||
| 19 | # Uncomment the below lines if you want to program | ||
| 20 | # your Teensy via the VM rather than your host OS | ||
| 21 | #vb.customize ['modifyvm', :id, '--usb', 'on'] | ||
| 22 | #vb.customize ['usbfilter', 'add', '0', | ||
| 23 | # '--target', :id, | ||
| 24 | # '--name', 'teensy', | ||
| 25 | # '--vendorid', '0x16c0', | ||
| 26 | # '--productid','0x0478' | ||
| 27 | # ] | ||
| 28 | # Customize the amount of memory on the VM: | ||
| 29 | vb.memory = "512" | ||
| 30 | # Uncomment the below lines if you have time sync | ||
| 31 | # issues with make and incremental builds | ||
| 32 | #vb.customize [ "guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold", 1000 ] | ||
| 33 | end | ||
| 34 | |||
| 35 | # This section allows you to customize the VMware VM | ||
| 36 | # settings, ie showing the GUI or upping the memory | ||
| 37 | # or cores if desired | ||
| 38 | config.vm.provider "vmware_workstation" do |vmw| | ||
| 39 | # Hide the VMware GUI when booting the machine | ||
| 40 | vmw.gui = false | ||
| 41 | |||
| 42 | # Customize the amount of memory on the VM: | ||
| 43 | vmw.memory = "512" | ||
| 44 | end | ||
| 45 | |||
| 46 | config.vm.provider "vmware_fusion" do |vmf| | ||
| 47 | # Hide the vmfare GUI when booting the machine | ||
| 48 | vmf.gui = false | ||
| 49 | |||
| 50 | # Customize the amount of memory on the VM: | ||
| 51 | vmf.memory = "512" | ||
| 52 | end | ||
| 53 | |||
| 54 | # Docker provider pulls from hub.docker.com respecting docker.image if | ||
| 55 | # config.vm.box is nil. In this case, we adhoc build util/vagrant/Dockerfile. | ||
| 56 | # Note that this bind-mounts from the current dir to | ||
| 57 | # /vagrant in the guest, so unless your UID is 1000 to match vagrant in the | ||
| 58 | # image, you'll need to: chmod -R a+rw . | ||
| 59 | config.vm.provider "docker" do |docker, override| | ||
| 60 | override.vm.box = nil | ||
| 61 | docker.build_dir = "util/vagrant" | ||
| 62 | docker.has_ssh = true | ||
| 63 | end | ||
| 64 | |||
| 65 | # Unless we are running the docker container directly | ||
| 66 | # 1. run container detached on vm | ||
| 67 | # 2. attach on 'vagrant ssh' | ||
| 68 | ["virtualbox", "vmware_workstation", "vmware_fusion"].each do |type| | ||
| 69 | config.vm.provider type do |virt, override| | ||
| 70 | override.vm.provision "docker" do |d| | ||
| 71 | d.run "qmkfm/qmk_cli", | ||
| 72 | cmd: "tail -f /dev/null", | ||
| 73 | args: "--privileged -v /dev:/dev -v '/vagrant:/vagrant'" | ||
| 74 | end | ||
| 75 | |||
| 76 | override.vm.provision "shell", inline: <<-SHELL | ||
| 77 | echo 'docker restart qmkfm-qmk_cli && exec docker exec -it qmkfm-qmk_cli /bin/bash -l' >> ~vagrant/.bashrc | ||
| 78 | SHELL | ||
| 79 | end | ||
| 80 | end | ||
| 81 | |||
| 82 | config.vm.post_up_message = <<-EOT | ||
| 83 | |||
| 84 | Log into the environment using 'vagrant ssh'. QMK directory synchronized with | ||
| 85 | host is located at /vagrant | ||
| 86 | To compile the .hex files use make command inside this directory, e.g. | ||
| 87 | cd /vagrant | ||
| 88 | make <keyboard>:default | ||
| 89 | |||
| 90 | Examples: | ||
| 91 | make planck/rev4:default:dfu | ||
| 92 | make planck/rev4:default | ||
| 93 | |||
| 94 | EOT | ||
| 95 | end | ||
diff --git a/docs/_summary.md b/docs/_summary.md index 01808bd675..ce579cb071 100644 --- a/docs/_summary.md +++ b/docs/_summary.md | |||
| @@ -41,7 +41,6 @@ | |||
| 41 | * [Keymap Overview](keymap.md) | 41 | * [Keymap Overview](keymap.md) |
| 42 | * Development Environments | 42 | * Development Environments |
| 43 | * [Docker Guide](getting_started_docker.md) | 43 | * [Docker Guide](getting_started_docker.md) |
| 44 | * [Vagrant Guide](getting_started_vagrant.md) | ||
| 45 | * Flashing | 44 | * Flashing |
| 46 | * [Flashing](flashing.md) | 45 | * [Flashing](flashing.md) |
| 47 | * [Flashing ATmega32A (ps2avrgb)](flashing_bootloadhid.md) | 46 | * [Flashing ATmega32A (ps2avrgb)](flashing_bootloadhid.md) |
diff --git a/docs/getting_started_vagrant.md b/docs/getting_started_vagrant.md deleted file mode 100644 index b5b5ce1539..0000000000 --- a/docs/getting_started_vagrant.md +++ /dev/null | |||
| @@ -1,56 +0,0 @@ | |||
| 1 | # Vagrant Quick Start | ||
| 2 | |||
| 3 | This project includes a `Vagrantfile` that will allow you to build a new firmware for your keyboard very easily without major changes to your primary operating system. This also ensures that when you clone the project and perform a build, you have the exact same environment as anyone else using the Vagrantfile to build. This makes it much easier for people to help you troubleshoot any issues you encounter. | ||
| 4 | |||
| 5 | ## Requirements | ||
| 6 | |||
| 7 | Using the `Vagrantfile` in this repository requires you have [Vagrant](https://www.vagrantup.com/) as well as a supported provider installed: | ||
| 8 | |||
| 9 | * [VirtualBox](https://www.virtualbox.org/) (Version at least 5.0.12) | ||
| 10 | * Sold as 'the most accessible platform to use Vagrant' | ||
| 11 | * [VMware Workstation](https://www.vmware.com/products/workstation) and [Vagrant VMware plugin](https://www.vagrantup.com/vmware) | ||
| 12 | * The (paid) VMware plugin requires a licensed copy of VMware Workstation/Fusion | ||
| 13 | * [Docker](https://www.docker.com/) | ||
| 14 | |||
| 15 | Other than having Vagrant, a suitable provider installed and possibly a restart of your computer afterwards, you can simple run a 'vagrant up' anywhere inside the folder where you checked out this project and it will start an environment (either a virtual machine or container) that contains all the tools required to build this project. There is a post Vagrant startup hint that will get you off on the right foot, otherwise you can also reference the build documentation below. | ||
| 16 | |||
| 17 | ## Flashing the Firmware | ||
| 18 | |||
| 19 | The "easy" way to flash the firmware is using a tool from your host OS: | ||
| 20 | |||
| 21 | * [QMK Toolbox](https://github.com/qmk/qmk_toolbox) (recommended) | ||
| 22 | * [Teensy Loader](https://www.pjrc.com/teensy/loader.html) | ||
| 23 | |||
| 24 | If you want to program via the command line you can uncomment the ['modifyvm'] lines in the Vagrantfile to enable the USB passthrough into Linux and then program using the command line tools like dfu-util/dfu-programmer or you can install the Teensy CLI version. | ||
| 25 | |||
| 26 | ## Vagrantfile Overview | ||
| 27 | The development environment is configured to run the QMK Docker image, `qmkfm/qmk_cli`. This not only ensures predictability between systems, it also mirrors the CI environment. | ||
| 28 | |||
| 29 | ## FAQ | ||
| 30 | |||
| 31 | ### Why am I seeing issues under Virtualbox? | ||
| 32 | Certain versions of Virtualbox 5 appear to have an incompatibility with the Virtualbox extensions installed in the boxes in this Vagrantfile. If you encounter any issues with the /vagrant mount not succeeding, please upgrade your version of Virtualbox to at least 5.0.12. **Alternately, you can try running the following command:** | ||
| 33 | |||
| 34 | ``` | ||
| 35 | vagrant plugin install vagrant-vbguest | ||
| 36 | ``` | ||
| 37 | |||
| 38 | ### How do I remove an existing environment? | ||
| 39 | Finished with your environment? From anywhere inside the folder where you checked out this project, Execute: | ||
| 40 | |||
| 41 | ``` | ||
| 42 | vagrant destroy | ||
| 43 | ``` | ||
| 44 | |||
| 45 | ### What if I want to use Docker directly? | ||
| 46 | Want to benefit from the Vagrant workflow without a virtual machine? The Vagrantfile is configured to bypass running a virtual machine, and run the container directly. Execute the following when bringing up the environment to force the use of Docker: | ||
| 47 | ``` | ||
| 48 | vagrant up --provider=docker | ||
| 49 | ``` | ||
| 50 | |||
| 51 | ### How do I access the virtual machine instead of the Docker container? | ||
| 52 | Execute the following to bypass the `vagrant` user booting directly to the official qmk builder image: | ||
| 53 | |||
| 54 | ``` | ||
| 55 | vagrant ssh -c 'sudo -i' | ||
| 56 | ``` | ||
diff --git a/docs/ja/_summary.md b/docs/ja/_summary.md index 8516a5eaaa..e49853bfd4 100644 --- a/docs/ja/_summary.md +++ b/docs/ja/_summary.md | |||
| @@ -38,7 +38,6 @@ | |||
| 38 | * [キーマップの概要](ja/keymap.md) | 38 | * [キーマップの概要](ja/keymap.md) |
| 39 | * 開発環境 | 39 | * 開発環境 |
| 40 | * [Docker のガイド](ja/getting_started_docker.md) | 40 | * [Docker のガイド](ja/getting_started_docker.md) |
| 41 | * [Vagrant のガイド](ja/getting_started_vagrant.md) | ||
| 42 | * 書き込み | 41 | * 書き込み |
| 43 | * [書き込み](ja/flashing.md) | 42 | * [書き込み](ja/flashing.md) |
| 44 | * [ATmega32A の書き込み (ps2avrgb)](ja/flashing_bootloadhid.md) | 43 | * [ATmega32A の書き込み (ps2avrgb)](ja/flashing_bootloadhid.md) |
diff --git a/docs/ja/getting_started_vagrant.md b/docs/ja/getting_started_vagrant.md deleted file mode 100644 index 0888b7f311..0000000000 --- a/docs/ja/getting_started_vagrant.md +++ /dev/null | |||
| @@ -1,61 +0,0 @@ | |||
| 1 | # Vagrant クイックスタート | ||
| 2 | |||
| 3 | <!--- | ||
| 4 | original document: 0.12.43:docs/getting_started_vagrant.md | ||
| 5 | git diff 0.12.43 HEAD -- docs/getting_started_vagrant.md | cat | ||
| 6 | --> | ||
| 7 | |||
| 8 | このプロジェクトは、プライマリオペレーティングシステムに大きな変更を加えることなくキーボードの新しいファームウェアを非常に簡単に構築することができる `Vagrantfile` を含みます。これは、あなたがプロジェクトをクローンしビルドを実行した時に、ビルドのために Vagrantfile を使っている他のユーザと全く同じ環境を持つことも保証します。これにより、人々はあなたが遭遇した問題の解決をより簡単に行えるようになります。 | ||
| 9 | |||
| 10 | ## 必要事項 | ||
| 11 | |||
| 12 | このリポジトリ内の `Vagrantfile` を使うには、[Vagrant](https://www.vagrantup.com/) およびサポートされるプロバイダがインストールされている必要があります: | ||
| 13 | |||
| 14 | * [VirtualBox](https://www.virtualbox.org/) (バージョン 5.0.12 以降) | ||
| 15 | * 「Vagrant を使うために最もアクセスしやすいプラットフォーム」とうたわれています。 | ||
| 16 | * [VMware Workstation](https://www.vmware.com/products/workstation) および [Vagrant VMware プラグイン](https://www.vagrantup.com/vmware) | ||
| 17 | * (有料) VMware プラグインには、ライセンスされた VMware Workstation/Fusion のコピーが必要です。 | ||
| 18 | * [Docker](https://www.docker.com/) | ||
| 19 | |||
| 20 | Vagrant 以外に、適切なプロバイダがインストールされ、その後におそらくコンピュータを再起動すると、このプロジェクトをチェックアウトしたフォルダ内の任意の場所で 'vagrant up' を単純に実行することができ、このプロジェクトをビルドするのに必要な全てのツールが含まれる環境(仮想マシンあるいはコンテナ)が開始されます。Vagrant 起動時にうまく始めるためのヒントが表示されますが、それ以外に、以下のビルドドキュメントを参照することもできます。 | ||
| 21 | |||
| 22 | ## ファームウェアの書き込み | ||
| 23 | |||
| 24 | ファームウェアを書き込む「簡単な」方法は、ホスト OS からツールを使うことです: | ||
| 25 | |||
| 26 | * [QMK Toolbox](https://github.com/qmk/qmk_toolbox) (推奨) | ||
| 27 | * [Teensy ローダー](https://www.pjrc.com/teensy/loader.html) | ||
| 28 | |||
| 29 | コマンドラインでプログラムしたい場合は、Vagranfile の ['modifyvm'] 行のコメントを解除して Linux への USB パススルーを有効にし、dfu-util/dfu-programmer のようなコマンドラインツールを使ってプログラムすることができます。あるいは Teensy CLI バージョンをインストールすることができます。 | ||
| 30 | |||
| 31 | ## Vagrantfile の概要 | ||
| 32 | 開発環境は QMK Docker イメージ、`qmkfm/qmk_cli` を実行するように設定されています。これはシステム間の予測可能性が保証されるだけでなく、CI 環境もミラーされます。 | ||
| 33 | |||
| 34 | ## FAQ | ||
| 35 | |||
| 36 | ### Virtualbox で問題が発生するのはなぜですか? | ||
| 37 | Virtualbox 5 の特定のバージョンはこの Vagrantfile のボックスにインストールされている Virtualbox の拡張機能と互換性が無いようです。/vagrant のマウントで問題が発生した場合は、Virtualbox のバージョンを少なくとも 5.0.12 にアップグレードしてください。**または、以下のコマンドを実行してみることができます:** | ||
| 38 | |||
| 39 | ```console | ||
| 40 | vagrant plugin install vagrant-vbguest | ||
| 41 | ``` | ||
| 42 | |||
| 43 | ### 既存の環境を削除するにはどうすればいいですか? | ||
| 44 | あなたの環境での作業が完了しましたか?このプロジェクトをチェックアウトしたフォルダの中のどこからでも、以下を実行してください: | ||
| 45 | |||
| 46 | ```console | ||
| 47 | vagrant destroy | ||
| 48 | ``` | ||
| 49 | |||
| 50 | ### Docker を直接使いたい場合はどうしますか? | ||
| 51 | 仮想マシン無しで Vagrant のワークフローを活用したいですか?Vagrantfile は仮想マシンの実行をバイパスし、コンテナを直接実行するように設定されています。Docker を強制的に使うように環境を立ち上げる場合は、以下を実行してください: | ||
| 52 | ```console | ||
| 53 | vagrant up --provider=docker | ||
| 54 | ``` | ||
| 55 | |||
| 56 | ### Docker コンテナではなく仮想マシンにアクセスするにはどうすればいいですか? | ||
| 57 | 以下を実行して、公式の QMK ビルダーイメージから直接起動する `vagrant` ユーザをバイパスするようにします: | ||
| 58 | |||
| 59 | ```console | ||
| 60 | vagrant ssh -c 'sudo -i' | ||
| 61 | ``` | ||
diff --git a/docs/zh-cn/_summary.md b/docs/zh-cn/_summary.md index 3baee6dc2e..b8c26ac275 100644 --- a/docs/zh-cn/_summary.md +++ b/docs/zh-cn/_summary.md | |||
| @@ -42,7 +42,6 @@ | |||
| 42 | * [键映射总览](zh-cn/keymap.md) | 42 | * [键映射总览](zh-cn/keymap.md) |
| 43 | * 开发环境 | 43 | * 开发环境 |
| 44 | * [Docker指南](zh-cn/getting_started_docker.md) | 44 | * [Docker指南](zh-cn/getting_started_docker.md) |
| 45 | * [Vagrant指南](zh-cn/getting_started_vagrant.md) | ||
| 46 | * 刷写(Flashing) | 45 | * 刷写(Flashing) |
| 47 | * [刷写](zh-cn/flashing.md) | 46 | * [刷写](zh-cn/flashing.md) |
| 48 | * [刷写ATmega32A (ps2avrgb)](zh-cn/flashing_bootloadhid.md) | 47 | * [刷写ATmega32A (ps2avrgb)](zh-cn/flashing_bootloadhid.md) |
| @@ -188,5 +187,5 @@ | |||
| 188 | * [Midi辅助功能](zh-cn/internals/midi_util.md) | 187 | * [Midi辅助功能](zh-cn/internals/midi_util.md) |
| 189 | * [发送函数](zh-cn/internals/send_functions.md) | 188 | * [发送函数](zh-cn/internals/send_functions.md) |
| 190 | * [Sysex工具](zh-cn/internals/sysex_tools.md) | 189 | * [Sysex工具](zh-cn/internals/sysex_tools.md) |
| 191 | 190 | ||
| 192 | <!--fromen:20211014-12:00(GMT+8) commit 04cf161aa01fd433b5dae69d9fd31569ed5dca59--> | 191 | <!--fromen:20211014-12:00(GMT+8) commit 04cf161aa01fd433b5dae69d9fd31569ed5dca59--> |
diff --git a/docs/zh-cn/getting_started_vagrant.md b/docs/zh-cn/getting_started_vagrant.md deleted file mode 100644 index 5e5de44552..0000000000 --- a/docs/zh-cn/getting_started_vagrant.md +++ /dev/null | |||
| @@ -1,61 +0,0 @@ | |||
| 1 | # Vagrant快速上手指引 | ||
| 2 | |||
| 3 | <!--- | ||
| 4 | original document: 0.15.12:docs/getting_started_vagrant.md | ||
| 5 | git diff 0.15.12 HEAD -- docs/getting_started_vagrant.md | cat | ||
| 6 | --> | ||
| 7 | |||
| 8 | 本工程包含一份 `Vagrantfile`,可以方便地在不更改你系统环境情况下完成新固件文件的构建工作。这同时也保证了在你拉取该工程代码后的编译环境与也使用Vagrantfile的其它人的一致。当你需要其他人协助你排查遇到的问题时会方便很多。 | ||
| 9 | |||
| 10 | ## 需求 | ||
| 11 | |||
| 12 | 本工程中的 `Vagrantfile` 需要安装[Vagrant](https://www.vagrantup.com/)以及可用的虚拟机服务: | ||
| 13 | |||
| 14 | * [VirtualBox](https://www.virtualbox.org/) (5.0.12及以后版本) | ||
| 15 | * 卖点是'最适用于Vagrant的平台' | ||
| 16 | * [VMware Workstation](https://www.vmware.com/products/workstation) 及 [Vagrant VMware插件](https://www.vagrantup.com/vmware) | ||
| 17 | * (付费购买的)VMware插件需要在经过正版授权的VMware Workstation/Fusion上运行 | ||
| 18 | * [Docker](https://www.docker.com/) | ||
| 19 | |||
| 20 | 安装了Vagrant之后,在安装合适的虚拟机服务后可能需要重启机器。拉取本工程后在工程目录下执行 'vagrant up' 将启动一个包含了所有本工程所需工具的构建环境(虚拟机或是容器)。最后会有一个vagrant启动提示告知你一切正常就绪,否则你也可以参考一下下面的构建文档。 | ||
| 21 | |||
| 22 | ## 刷写固件 | ||
| 23 | |||
| 24 | 比较“简单”的方案是在你的宿主系统上借助以下工具刷写固件: | ||
| 25 | |||
| 26 | * [QMK工具箱](https://github.com/qmk/qmk_toolbox) (推荐) | ||
| 27 | * [Teensy Loader](https://www.pjrc.com/teensy/loader.html) | ||
| 28 | |||
| 29 | 如果你希望通过命令行进行编程工作,可以在Vagrantfile中取消掉['modifyvm']的注释以允许USB直通到Linux环境,既可以使用dfu-util/dfu-programmer之类的命令行工具进行编程工作,或是安装Teensy的命令行版本。 | ||
| 30 | |||
| 31 | ## Vagrantfile概览 | ||
| 32 | 开发环境被配置为运行QMK Docker镜像 `qmkfm/qmk_cli`,不仅让各系统下的功能预期一致,也是我们CI环境的镜像。 | ||
| 33 | |||
| 34 | ## FAQ | ||
| 35 | |||
| 36 | ### 为什么我的VirtualBox环境会有问题? | ||
| 37 | VirtualBox 5的某些版本与工程中Vagrantfile中指定的VirtualBox扩展存在兼容问题。如果你遇到了/vagrant挂载不成功的问题,请升级VirtualBox至5.0.12或更高版本。**或者,可以尝试执行如下命令:** | ||
| 38 | |||
| 39 | ```console | ||
| 40 | vagrant plugin install vagrant-vbguest | ||
| 41 | ``` | ||
| 42 | |||
| 43 | ### 如何移除一个现有环境? | ||
| 44 | 不再需要这个环境了是吗?在本工程目录下的任何位置,执行: | ||
| 45 | |||
| 46 | ```console | ||
| 47 | vagrant destroy | ||
| 48 | ``` | ||
| 49 | |||
| 50 | ### 如果我是想直接用Docker呢? | ||
| 51 | 想在不使用虚拟机技术的情况下也能使用Vagrant工作流?Vagrangfile已配置为允许绕过运行虚拟机,直接运行容器。通过如下方式执行命令可以强制使用Docker来启动环境: | ||
| 52 | ```console | ||
| 53 | vagrant up --provider=docker | ||
| 54 | ``` | ||
| 55 | |||
| 56 | ### 如何访问虚拟机环境而非Docker容器? | ||
| 57 | 通过如下方法跳过 `vagrant` 的用户初始化过程以在QMK构建镜像中直接执行: | ||
| 58 | |||
| 59 | ```console | ||
| 60 | vagrant ssh -c 'sudo -i' | ||
| 61 | ``` | ||
diff --git a/util/vagrant/Dockerfile b/util/vagrant/Dockerfile deleted file mode 100644 index 951d4fc40d..0000000000 --- a/util/vagrant/Dockerfile +++ /dev/null | |||
| @@ -1,33 +0,0 @@ | |||
| 1 | FROM qmkfm/qmk_cli | ||
| 2 | |||
| 3 | # Basic upgrades; install sudo and SSH. | ||
| 4 | RUN apt-get update && apt-get install --no-install-recommends -y \ | ||
| 5 | sudo \ | ||
| 6 | openssh-server \ | ||
| 7 | && rm -rf /var/lib/apt/lists/* | ||
| 8 | RUN mkdir /var/run/sshd | ||
| 9 | RUN sed -i 's/PermitRootLogin yes/PermitRootLogin no/' /etc/ssh/sshd_config | ||
| 10 | RUN echo 'UseDNS no' >> /etc/ssh/sshd_config | ||
| 11 | |||
| 12 | # Remove the policy file once we're finished installing software. | ||
| 13 | # This allows invoke-rc.d and friends to work as expected. | ||
| 14 | RUN rm /usr/sbin/policy-rc.d | ||
| 15 | |||
| 16 | # Add the Vagrant user and necessary passwords. | ||
| 17 | RUN groupadd vagrant | ||
| 18 | RUN useradd -c "Vagrant" -g vagrant -d /home/vagrant -m -s /bin/bash vagrant | ||
| 19 | RUN echo 'root:vagrant' | chpasswd | ||
| 20 | RUN echo 'vagrant:vagrant' | chpasswd | ||
| 21 | |||
| 22 | # Allow the vagrant user to use sudo without a password. | ||
| 23 | RUN echo 'vagrant ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/vagrant | ||
| 24 | |||
| 25 | # Install Vagrant's insecure public key so provisioning and 'vagrant ssh' work. | ||
| 26 | RUN mkdir /home/vagrant/.ssh | ||
| 27 | ADD https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub /home/vagrant/.ssh/authorized_keys | ||
| 28 | RUN chmod 0600 /home/vagrant/.ssh/authorized_keys | ||
| 29 | RUN chown -R vagrant:vagrant /home/vagrant/.ssh | ||
| 30 | RUN chmod 0700 /home/vagrant/.ssh | ||
| 31 | |||
| 32 | EXPOSE 22 | ||
| 33 | CMD ["/usr/sbin/sshd", "-D"] | ||
diff --git a/util/vagrant/readme.md b/util/vagrant/readme.md deleted file mode 100644 index a8396007ee..0000000000 --- a/util/vagrant/readme.md +++ /dev/null | |||
| @@ -1,12 +0,0 @@ | |||
| 1 | # QMK Vagrant Utilities | ||
| 2 | |||
| 3 | ## Dockerfile | ||
| 4 | Vagrant-friendly `qmkfm/qmk_cli`. | ||
| 5 | |||
| 6 | In order for the Docker provider and `vagrant ssh` to function the container has a few extra requirements. | ||
| 7 | |||
| 8 | * vagrant user | ||
| 9 | * ssh server | ||
| 10 | * configured with expected public key | ||
| 11 | * sudo | ||
| 12 | * passwordless for vagrant user | ||
