Skip to content

Commit

Permalink
Merge pull request #810 from anarkiwi/up
Browse files Browse the repository at this point in the history
Improve build and upgrade
  • Loading branch information
anarkiwi authored Aug 4, 2024
2 parents 29ef76f + 49c2e7d commit 0293b00
Show file tree
Hide file tree
Showing 4 changed files with 384 additions and 394 deletions.
14 changes: 6 additions & 8 deletions Dockerfile.server
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
FROM ubuntu:jammy as builder
FROM ubuntu:noble AS builder

ARG PIP_INDEX_URL
ARG PIP_TRUSTED_HOST
ENV PIP_INDEX_URL=${PIP_INDEX_URL}
ENV PIP_TRUSTED_HOST=${PIP_TRUSTED_HOST}

# TODO: use piwheels for armv7l specifically until/if ever mainline wheels available.
RUN if [ "$(uname -m)" = "armv7l" ] ; then echo "using piwheels" ; /bin/echo -e "[global]\nextra-index-url=https://www.piwheels.org/simple\n" > /etc/pip.conf ; fi
# TODO: can't use with latest cryptography
# RUN if [ "$(uname -m)" = "armv7l" ] ; then echo "using piwheels" ; /bin/echo -e "[global]\nextra-index-url=https://www.piwheels.org/simple\n" > /etc/pip.conf ; fi

COPY . /faucetconfrpc
WORKDIR /faucetconfrpc

RUN apt-get update && apt-get install -y curl python3-dev gcc git g++ libc6-dev libyaml-dev libffi-dev libxml2-dev libxslt-dev make python3-pip libssl-dev openssl pkg-config
RUN --mount=type=tmpfs,target=/root/.cargo /bin/bash -c 'curl https://sh.rustup.rs -sSf | bash -s -- -y && source ~/.cargo/env && MAKEFLAGS="-j $(nproc)" pip install . --break-system-packages -v'

RUN pip install -U pip
RUN --mount=type=tmpfs,target=/root/.cargo /bin/bash -c 'curl https://sh.rustup.rs -sSf | bash -s -- -y && source ~/.cargo/env && MAKEFLAGS="-j $(nproc)" pip install . -v'
FROM ubuntu:noble

FROM ubuntu:jammy
RUN apt-get update && apt-get install -y python3 iproute2 libatomic1 libssl1* openssl

COPY --from=builder /usr/local /usr/local

RUN apt-get update && apt-get install -y python3 iproute2 libatomic1

RUN python3 -c "from faucetconfrpc.faucetconfrpc_client_lib import FaucetConfRpcClient"
RUN faucetconfrpc_client --help
RUN faucetconfrpc_server --help
Expand Down
2 changes: 1 addition & 1 deletion certstrap/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.22-alpine as build
FROM golang:1.22-alpine AS build

ENV GO111MODULE="on"
RUN go install github.com/square/certstrap@latest
Expand Down
Loading

0 comments on commit 0293b00

Please sign in to comment.