Skip to content

Commit

Permalink
Implement workaround for Cargo issue on ARMv7
Browse files Browse the repository at this point in the history
  • Loading branch information
y-almannaee authored Nov 18, 2022
1 parent a54939d commit ca97214
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions docker-src/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,13 @@ RUN /bin/bash -c 'cd /nginx-1.21.6 && make'

FROM phusion/baseimage:focal-1.1.0 AS builder_py

# Use baseimage-docker's init system.
CMD ["/sbin/my_init"]

# ...put your own build instructions here...
RUN apt-get update && /sbin/install_clean curl build-essential libpcre3 libpcre3-dev zlib1g zlib1g-dev libssl-dev openssl libgd-dev libxml2 libxml2-dev uuid-dev git python3 python3-pip python3-dev libffi-dev
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
RUN mkdir -p /etc/pyserver
COPY python-src/* /etc/pyserver/
RUN python3 -m pip install --upgrade pip
RUN python3 -m pip install --ignore-installed --upgrade -r /etc/pyserver/requirements.txt
RUN --mount=type=tmpfs,target=/root/.cargo /bin/bash -c 'curl https://sh.rustup.rs -sSf | bash -s -- -y && \
source ~/.cargo/env; \
python3 -m pip install --ignore-installed --upgrade -r /etc/pyserver/requirements.txt'

FROM phusion/baseimage:focal-1.1.0

Expand Down Expand Up @@ -110,4 +106,4 @@ RUN /bin/bash -c "mkdir -p /etc/crontabs/root && echo '*/15 * * * * /usr/bin/pyt
# RUN /bin/bash -c 'rm -r /etc/nginx/html || : && mkdir -p /etc/nginx/html'

# Clean up APT when done.
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

0 comments on commit ca97214

Please sign in to comment.