# Docker container build works locally, but not on Ubuntu runner. Fails on building uwsgi

**URL:** <https://discuss.circleci.com/t/docker-container-build-works-locally-but-not-on-ubuntu-runner-fails-on-building-uwsgi/44426>\
**Category:** Deployments\
**Tags:** docker, python\
**Created:** [June 14, 2022, 1:51pm UTC](https://discuss.circleci.com/t/docker-container-build-works-locally-but-not-on-ubuntu-runner-fails-on-building-uwsgi/44426 "2022-06-14T13:51:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![grahamalama](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/grahamalama/32/30384_2.png) [@grahamalama](https://discuss.circleci.com/u/grahamalama)\
**Post date:** [June 14, 2022, 1:51pm UTC](https://discuss.circleci.com/t/docker-container-build-works-locally-but-not-on-ubuntu-runner-fails-on-building-uwsgi/44426/1 "2022-06-14T13:51:43Z")

</div>

We have a Dockerfile that starts

```auto
# syntax=docker/dockerfile:1.3

FROM python:3.10.5-bullseye as compile

# Get rustup https://rustup.rs/ for canonicaljson-rs
# minimal profile https://rust-lang.github.io/rustup/concepts/profiles.html
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --profile minimal -y
ENV PATH="/root/.cargo/bin:$PATH"

RUN python -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"

RUN python -m pip install --upgrade pip
COPY requirements.txt .
RUN python -m pip install --no-cache-dir -r requirements.txt
...

```

one of of the requirements in `requirements.txt` being `uwsgi==2.0.20`.

We are able to build this docker container locally (on an Intel Mac) no problem.

But when trying to build the container in our pipeline:

```auto
  build_containers:
    machine:
      image: ubuntu-2004:2022.04.2
      docker_layer_caching: true
    environment:
      DOCKER_BUILDKIT: 1
      COMPOSE_DOCKER_CLI_BUILD: 1
      BUILDKIT_PROGRESS: plain
    steps:
      - checkout
      - run:
          name: Build
          command: docker-compose build
...

```

the build fails when trying to build uwsgi ([pastebin of error](https://pastebin.com/ScaAwDVL)).

Any ideas here? I thought the promise of Docker was that it was supposed to fix “works on my machine” 😭 .
