Prefix all docker image references with ghcr.io (#2749)

This commit is contained in:
Jesse Hills 2023-03-15 10:02:26 +13:00 committed by GitHub
parent fee7a606e3
commit cd31996569
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 33 additions and 33 deletions

View File

@ -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

View File

@ -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

View File

@ -36,7 +36,7 @@ Tips for using ESPHome
.. code-block:: yaml
- timing: !include click-single.yaml
- timing: !include click-single.yaml
then:
- mqtt.publish:
topic: ${device_name}/button${id}/status
@ -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
@ -356,7 +356,7 @@ And a docker compose file looks like this:
- /dev/ttyACM0:/dev/ttyACM0
network_mode: host
restart: always
.. _docker-reference-notes:
.. note::
@ -420,7 +420,7 @@ If an external pullup/down changes the configured voltage levels boot failures o
While the use of them in software is not a problem, if there's something attached to the pins (particularly if they're not floating during the bootup) you may run into problems.
It's recommended to avoid them unless you have a pressing need to use them and you have reviewed the expected boot voltage levels of these pins from the ESP datasheet.
Some development boards connect GPIO 0 to a button, often labeled "boot". Holding this button while the ESP is turning on will cause it to go into bootloader mode. Once the ESP is fully booted up, this button can be used as a normal input safely.
Some development boards connect GPIO 0 to a button, often labeled "boot". Holding this button while the ESP is turning on will cause it to go into bootloader mode. Once the ESP is fully booted up, this button can be used as a normal input safely.
How can I test a Pull Request?
------------------------------

View File

@ -14,15 +14,15 @@ Installation
See :doc:`installing_esphome`.
If you're familiar with Docker, you can use that instead!
Note that on macOS Docker `can not pass USB devices through <https://github.com/moby/hyperkit/issues/149>`__.
If you're familiar with Docker, you can use that instead!
Note that on macOS Docker `can not pass USB devices through <https://github.com/moby/hyperkit/issues/149>`__.
You will not be able to flash ESP devices through USB on Mac, all other features will work. Flashing with web dashboard is still possible.
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``.