Skip to content

Commit

Permalink
Switch to Python 3 for docker installs (esphome#774)
Browse files Browse the repository at this point in the history
  • Loading branch information
OttoWinter authored Oct 19, 2019
1 parent 28031cf commit 823ae7d
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
variables:
DOCKER_DRIVER: overlay2
DOCKER_HOST: tcp://docker:2375/
BASE_VERSION: '1.8.3'
BASE_VERSION: '2.0.0'
TZ: UTC

stages:
Expand Down Expand Up @@ -33,7 +33,7 @@ stages:
- docker info
- docker login -u "$DOCKER_USER" -p "$DOCKER_PASSWORD"
script:
- docker run --rm --privileged hassioaddons/qemu-user-static:latest
- docker run --rm --privileged multiarch/qemu-user-static:4.1.0-1 --reset -p yes
- TAG="${CI_COMMIT_TAG#v}"
- TAG="${TAG:-${CI_COMMIT_SHA:0:7}}"
- echo "Tag ${TAG}"
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ARG BUILD_FROM=esphome/esphome-base-amd64:1.8.3
ARG BUILD_FROM=esphome/esphome-base-amd64:2.0.0
FROM ${BUILD_FROM}

COPY . .
RUN pip2 install --no-cache-dir -e .
RUN pip3 install --no-cache-dir -e .

ENV USERNAME=""
ENV PASSWORD=""
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.hassio
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ COPY docker/rootfs/ /
COPY setup.py setup.cfg MANIFEST.in /opt/esphome/
COPY esphome /opt/esphome/esphome

RUN pip2 install --no-cache-dir -e /opt/esphome
RUN pip3 install --no-cache-dir -e /opt/esphome

# Build arguments
ARG BUILD_VERSION=dev
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile.lint
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM esphome/esphome-base-amd64:1.8.3
FROM esphome/esphome-base-amd64:2.0.0

RUN \
apt-get update \
Expand All @@ -12,7 +12,7 @@ RUN \
/var/lib/apt/lists/*

COPY requirements_test.txt /requirements_test.txt
RUN pip2 install --no-cache-dir wheel && pip2 install --no-cache-dir -r /requirements_test.txt
RUN pip3 install --no-cache-dir wheel && pip3 install --no-cache-dir -r /requirements_test.txt

VOLUME ["/esphome"]
WORKDIR /esphome
2 changes: 1 addition & 1 deletion docker/rootfs/etc/cont-init.d/30-esphome.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ if bashio::config.has_value 'esphome_version'; then
esphome_version=$(bashio::config 'esphome_version')
full_url="https://github.com/esphome/esphome/archive/${esphome_version}.zip"
bashio::log.info "Installing esphome version '${esphome_version}' (${full_url})..."
pip2 install -U --no-cache-dir "${full_url}" \
pip3 install -U --no-cache-dir "${full_url}" \
|| bashio::exit.nok "Failed installing esphome pinned version."
fi

0 comments on commit 823ae7d

Please sign in to comment.