Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running Dockerfile on ARM architecture #344

Open
AlexKalopsia opened this issue Mar 10, 2024 · 1 comment
Open

Running Dockerfile on ARM architecture #344

AlexKalopsia opened this issue Mar 10, 2024 · 1 comment

Comments

@AlexKalopsia
Copy link

Hello, first of all, thanks for uwsgi-nginx-flask-docker .

A couple of years ago I build a python webapp that I deployed as a docker container. I am pretty sure I followed this guide: https://www.digitalocean.com/community/tutorials/how-to-build-and-deploy-a-flask-application-using-docker-on-ubuntu-18-04

Fast-forward to now, I now have a Raspberry Pi, and I want to deploy the container.

My Dockerfile currently looks like this

FROM tiangolo/uwsgi-nginx-flask:python3.8-alpine
RUN apk --update add bash nano
ENV STATIC_URL /static
ENV STATIC_PATH /app/myapp/static

# Install the dependencies
COPY ./requirements.txt /var/www/requirements.txt
RUN pip install -r /var/www/requirements.txt

The problem of course is that rpi runs on arm architecture, rather than alpine.

I would like to know if you have any pointer on how I could manage to get everything to run again.

Thank you

@AlexKalopsia
Copy link
Author

As usual, as soon as I wrote the question, I found the solution. I ended up using yosukeasanoflagellin/uwsgi-nginx-flask:python3.8.7 which supports arm architecture.

The final result was

FROM yosukeasanoflagellin/uwsgi-nginx-flask:python3.8.7
RUN apt-get update && apt-get install -y bash nano
ENV STATIC_URL /static
ENV STATIC_PATH /app/myapp/static

# Install the dependencies
COPY ./requirements.txt /var/www/requirements.txt
RUN pip install -r /var/www/requirements.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant