mirror of
https://github.com/esphome/esphome-docs.git
synced 2025-01-27 22:31:37 +01:00
Prefix all docker image references with ghcr.io (#2749)
This commit is contained in:
parent
fee7a606e3
commit
cd31996569
@ -171,7 +171,7 @@ With Docker:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
docker run --rm -v "${PWD}":/config -it esphome/esphome clean-mqtt configuration.yaml
|
||||
docker run --rm -v "${PWD}":/config -it ghcr.io/esphome/esphome clean-mqtt configuration.yaml
|
||||
|
||||
This will remove all retained messages with the topic
|
||||
``<DISCOVERY_PREFIX>/+/NODE_NAME/#``. If you want to purge on another
|
||||
|
@ -93,11 +93,11 @@ Build
|
||||
|
||||
.. note::
|
||||
|
||||
The easiest way is to use the `esphome-docs Docker image <https://hub.docker.com/r/esphome/esphome-docs/>`__:
|
||||
The easiest way is to use the `esphome-docs container image <ghcr.io/esphome/esphome-docs/>`__:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
docker run --rm -v "${PWD}/":/data/esphomedocs -p 8000:8000 -it esphome/esphome-docs
|
||||
docker run --rm -v "${PWD}/":/data/esphomedocs -p 8000:8000 -it ghcr.io/esphome/esphome-docs
|
||||
|
||||
With ``PWD`` referring to the root of the ``esphome-docs`` git repository. Then go to ``<CONTAINER_IP>:8000`` in your browser.
|
||||
|
||||
@ -662,10 +662,10 @@ Standard for the esphome-core codebase:
|
||||
.. code-block:: bash
|
||||
|
||||
# Full lint+test suite
|
||||
docker run --rm -v "${PWD}/":/esphome -it esphome/esphome-lint script/fulltest
|
||||
docker run --rm -v "${PWD}/":/esphome -it ghcr.io/esphome/esphome-lint script/fulltest
|
||||
|
||||
# Run lint only over changed files
|
||||
docker run --rm -v "${PWD}/":/esphome -it esphome/esphome-lint script/quicklint
|
||||
docker run --rm -v "${PWD}/":/esphome -it ghcr.io/esphome/esphome-lint script/quicklint
|
||||
|
||||
|
||||
If you are using Windows and have docker installed the syntax is slightly different.
|
||||
@ -676,7 +676,7 @@ Standard for the esphome-core codebase:
|
||||
# convert the volume format
|
||||
$current_dir=(Get-Location).Path.ToLower().Replace(':','').Replace('\','/')
|
||||
# Run lint only over changed files from powershell
|
||||
docker run --rm -v "$($current_dir):/esphome" -it esphome/esphome-lint script/quicklint
|
||||
docker run --rm -v "$($current_dir):/esphome" -it ghcr.io/esphome/esphome-lint script/quicklint
|
||||
|
||||
|
||||
|
||||
|
@ -158,7 +158,7 @@ It's simple. Run:
|
||||
|
||||
pip3 install -U esphome
|
||||
# From docker:
|
||||
docker pull esphome/esphome:latest
|
||||
docker pull ghcr.io/esphome/esphome:stable
|
||||
|
||||
And in Home Assistant, there's a simple UPDATE button when there's an update
|
||||
available as with all add-ons.
|
||||
@ -178,7 +178,7 @@ by installing the tested beta:
|
||||
pip3 install --pre -U esphome
|
||||
|
||||
# For docker-based installs
|
||||
docker run [...] -it esphome/esphome:beta run livingroom.yaml
|
||||
docker run [...] -it ghcr.io/esphome/esphome:beta run livingroom.yaml
|
||||
|
||||
For Home Assistant supervised installs add the community addons beta repository by
|
||||
adding
|
||||
@ -198,11 +198,11 @@ To install the dev version of ESPHome:
|
||||
- In Home Assistant: Add the ESPHome repository `https://github.com/esphome/home-assistant-addon <https://github.com/esphome/home-assistant-addon>`__
|
||||
in Add-on store -> Repositories. Then install the add-on ``ESPHome Dev``
|
||||
- From ``pip``: Run ``pip3 install https://github.com/esphome/esphome/archive/dev.zip``
|
||||
- From docker, use the `esphome/esphome:dev <https://hub.docker.com/r/esphome/esphome/tags?page=1&name=dev>`__ image
|
||||
- From docker, use the `ghcr.io/esphome/esphome:dev <https://github.com/esphome/esphome/pkgs/container/esphome/>`__ image
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
docker run [...] -it esphome:dev livingroom.yaml compile
|
||||
docker run [...] -it ghcr.io/esphome/esphome:dev livingroom.yaml compile
|
||||
|
||||
The latest dev docs are here: `next.esphome.io <https://next.esphome.io/>`__
|
||||
|
||||
@ -305,37 +305,37 @@ Install versions:
|
||||
.. code-block:: bash
|
||||
|
||||
# Stable Release
|
||||
docker pull esphome/esphome
|
||||
docker pull ghcr.io/esphome/esphome
|
||||
# Beta
|
||||
docker pull esphome/esphome:beta
|
||||
docker pull ghcr.io/esphome/esphome:beta
|
||||
# Dev version
|
||||
docker pull esphome/esphome:dev
|
||||
docker pull ghcr.io/esphome/esphome:dev
|
||||
|
||||
Command reference:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# Start a new file wizard for file livingroom.yaml
|
||||
docker run --rm -v "${PWD}":/config -it esphome/esphome wizard livingroom.yaml
|
||||
docker run --rm -v "${PWD}":/config -it ghcr.io/esphome/esphome wizard livingroom.yaml
|
||||
|
||||
# Compile and upload livingroom.yaml
|
||||
docker run --rm -v "${PWD}":/config -it esphome/esphome run livingroom.yaml
|
||||
docker run --rm -v "${PWD}":/config -it ghcr.io/esphome/esphome run livingroom.yaml
|
||||
|
||||
# View logs
|
||||
docker run --rm -v "${PWD}":/config -it esphome/esphome logs livingroom.yaml
|
||||
docker run --rm -v "${PWD}":/config -it ghcr.io/esphome/esphome logs livingroom.yaml
|
||||
|
||||
# Map /dev/ttyUSB0 into container
|
||||
docker run --rm -v "${PWD}":/config --device=/dev/ttyUSB0 -it esphome/esphome ...
|
||||
docker run --rm -v "${PWD}":/config --device=/dev/ttyUSB0 -it ghcr.io/esphome/esphome ...
|
||||
|
||||
# Start dashboard on port 6052 (general command)
|
||||
# Warning: this command is currently not working with Docker on MacOS. (see note below)
|
||||
docker run --rm -v "${PWD}":/config --net=host -it esphome/esphome
|
||||
docker run --rm -v "${PWD}":/config --net=host -it ghcr.io/esphome/esphome
|
||||
|
||||
# Start dashboard on port 6052 (MacOS specific command)
|
||||
docker run --rm -p 6052:6052 -e ESPHOME_DASHBOARD_USE_PING=true -v "${PWD}":/config -it esphome/esphome
|
||||
docker run --rm -p 6052:6052 -e ESPHOME_DASHBOARD_USE_PING=true -v "${PWD}":/config -it ghcr.io/esphome/esphome
|
||||
|
||||
# Setup a bash alias:
|
||||
alias esphome='docker run --rm -v "${PWD}":/config --net=host -it esphome/esphome'
|
||||
alias esphome='docker run --rm -v "${PWD}":/config --net=host -it ghcr.io/esphome/esphome'
|
||||
|
||||
And a docker compose file looks like this:
|
||||
|
||||
@ -345,7 +345,7 @@ And a docker compose file looks like this:
|
||||
|
||||
services:
|
||||
esphome:
|
||||
image: esphome/esphome
|
||||
image: ghcr.io/esphome/esphome
|
||||
volumes:
|
||||
- ./:/config:rw
|
||||
# Use local time for logging timestamps
|
||||
|
@ -22,7 +22,7 @@ Our image supports AMD64, ARM and ARM64 (AARCH64), and can be downloaded with:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
docker pull esphome/esphome
|
||||
docker pull ghcr.io/esphome/esphome
|
||||
|
||||
If you want to use `docker-compose` instead, here's a sample file:
|
||||
|
||||
@ -32,7 +32,7 @@ If you want to use `docker-compose` instead, here's a sample file:
|
||||
services:
|
||||
esphome:
|
||||
container_name: esphome
|
||||
image: esphome/esphome
|
||||
image: ghcr.io/esphome/esphome
|
||||
volumes:
|
||||
- /path/to/esphome/config:/config
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
@ -80,7 +80,7 @@ file called ``livingroom.yaml``:
|
||||
|
||||
esphome wizard livingroom.yaml
|
||||
# On Docker:
|
||||
docker run --rm -v "${PWD}":/config -it esphome/esphome wizard livingroom.yaml
|
||||
docker run --rm -v "${PWD}":/config -it ghcr.io/esphome/esphome wizard livingroom.yaml
|
||||
|
||||
At the end of this step, you will have your first YAML configuration
|
||||
file ready. It doesn't do much yet and only makes your device connect to
|
||||
@ -133,7 +133,7 @@ to your docker command to map a local USB device. Docker on Mac will not be able
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
docker run --rm --privileged -v "${PWD}":/config --device=/dev/ttyUSB0 -it esphome/esphome run livingroom.yaml
|
||||
docker run --rm --privileged -v "${PWD}":/config --device=/dev/ttyUSB0 -it ghcr.io/esphome/esphome run livingroom.yaml
|
||||
|
||||
Now when you go to the Home Assistant "Integrations" screen (under "Configuration" panel), you
|
||||
should see the ESPHome device show up in the discovered section (although this can take up to 5 minutes).
|
||||
@ -179,7 +179,7 @@ for docker you need to supply an additional parameter:
|
||||
|
||||
esphome livingroom.yaml run
|
||||
# On docker
|
||||
docker run --rm -v "${PWD}":/config -it esphome/esphome run livingroom.yaml
|
||||
docker run --rm -v "${PWD}":/config -it ghcr.io/esphome/esphome run livingroom.yaml
|
||||
|
||||
.. figure:: /components/binary_sensor/images/gpio-ui.png
|
||||
|
||||
@ -215,11 +215,11 @@ To start the ESPHome dashboard, simply start ESPHome with the following command
|
||||
esphome dashboard config/
|
||||
|
||||
# On Docker, host networking mode is required for online status indicators
|
||||
docker run --rm --net=host -v "${PWD}":/config -it esphome/esphome
|
||||
docker run --rm --net=host -v "${PWD}":/config -it ghcr.io/esphome/esphome
|
||||
|
||||
# On Docker with MacOS, the host networking option doesn't work as expected. An
|
||||
# alternative is to use the following command if you are a MacOS user.
|
||||
docker run --rm -p 6052:6052 -e ESPHOME_DASHBOARD_USE_PING=true -v "${PWD}":/config -it esphome/esphome
|
||||
docker run --rm -p 6052:6052 -e ESPHOME_DASHBOARD_USE_PING=true -v "${PWD}":/config -it ghcr.io/esphome/esphome
|
||||
|
||||
|
||||
After that, you will be able to access the dashboard through ``localhost:6052``.
|
||||
|
Loading…
Reference in New Issue
Block a user