树莓派魔镜项目——笔记二 Docker软件安装

Windows平台只需要安装有Docker Desktop,然后按照操作执行命令即可。

Installation of this RepositoryPermalink

Open a shell in your home directory and run

git clone https://gitlab.com/khassel/magicmirror.git

Now cd into the new directory magicmirror/run and copy the yml-file depending on the scenario, for scenario server ☝️:

cd ./magicmirror/run
cp serveronly.yml docker-compose.yml

For scenario electron ✌️:

cd ./magicmirror/run
cp rpi.yml docker-compose.yml

Start MagicMirror²Permalink

Navigate to ~/magicmirror/run and execute

docker-compose up -d

The container will start and with scenario electron ✌️ the MagicMirror should appear on the screen of your pi. In server only mode opening a browser at http://localhost:8080 should show the MagicMirror (scenario server ☝️).

The container is configured to restart automatically so after executing docker-compose up -d it will also restart after a reboot of your pi.

Linux需要额外安装个别东西,比如docker-compose

Compose 安装

Linux

Linux 上我们可以从 Github 上下载它的二进制包来使用,最新发行的版本地址:Releases · docker/compose · GitHub

运行以下命令以下载 Docker Compose 的当前稳定版本:

$ sudo curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

要安装其他版本的 Compose,请替换 1.24.1。

将可执行权限应用于二进制文件:

$ sudo chmod +x /usr/local/bin/docker-compose

创建软链:

$ sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose

测试是否安装成功:

$ docker-compose --version
cker-compose version 1.24.1, build 4667896b

注意: 对于 alpine,需要以下依赖包: py-pip,python-dev,libffi-dev,openssl-dev,gcc,libc-dev,和 make。

参见:

Installation - MagicMirror²

Docker Compose | 菜鸟教程

猜你喜欢

转载自blog.csdn.net/figosoar/article/details/120365894