Skip to content

Commit

Permalink
Attempt to get rustup to work
Browse files Browse the repository at this point in the history
  • Loading branch information
offbyone committed Nov 11, 2023
1 parent 642b981 commit bd4e704
Showing 1 changed file with 24 additions and 11 deletions.
35 changes: 24 additions & 11 deletions iot-certbot/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG BUILD_FROM
FROM $BUILD_FROM
FROM $BUILD_FROM AS build

# setup base
ARG \
Expand All @@ -9,31 +9,44 @@ ARG \

# py3-pip is kept in the installation because otherwise it removes some dependencies
# that we need (six)
RUN \
set -x \
&& apk add --no-cache --update \
RUN apk add --no-cache --update \
augeas \
curl \
libffi \
musl \
openssl \
py3-pip \
python3 \
&& apk add --no-cache --virtual .build-dependencies \
python3
RUN apk add --no-cache --virtual .build-dependencies \
augeas-dev \
build-base \
cargo \
libffi-dev \
musl-dev \
openssl-dev \
python3-dev \
&& python3 -mvenv /opt/certbot \
&& /opt/certbot/bin/python -mpip install --no-cache-dir --find-links \
python3-dev
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
RUN python3 -mvenv /opt/certbot
RUN /opt/certbot/bin/python -mpip install --no-cache-dir --find-links \
"https://wheels.home-assistant.io/alpine-$(cut -d '.' -f 1-2 < /etc/alpine-release)/${BUILD_ARCH}/" \
cryptography==${CRYPTOGRAPHY_VERSION} \
certbot==${CERTBOT_VERSION} \
certbot-dns-route53==${CERTBOT_VERSION} \
&& apk del .build-dependencies
certbot-dns-route53==${CERTBOT_VERSION}

FROM $BUILD_FROM

# Install the runtime dependencies in this layer
RUN apk add --no-cache --update \
augeas \
curl \
libffi \
musl \
openssl \
py3-pip \
python3

# Copy virtualenv
COPY --from=build /opt/certbot /opt/certbot

# Copy data
COPY rootfs /
Expand Down

0 comments on commit bd4e704

Please sign in to comment.