diff --git a/I2C_OLED/Dockerfile b/I2C_OLED/Dockerfile index a197f47..d63237d 100755 --- a/I2C_OLED/Dockerfile +++ b/I2C_OLED/Dockerfile @@ -10,7 +10,8 @@ RUN \ py3-pillow \ py3-smbus -RUN git clone -b 'v1.0.0' --single-branch --depth 1 https://github.com/crismc/rpi_i2c_oled.git /I2C_OLED +ENV LATEST_RELEASE=$(curl --silent 'https://api.github.com/repos/crismc/rpi_i2c_oled/releases/latest' | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') +RUN git clone -b $LATEST_RELEASE --single-branch --depth 1 https://github.com/crismc/rpi_i2c_oled.git /I2C_OLED COPY run.sh / WORKDIR /data