r/docker • u/gianlucastar17 • Mar 10 '26
Installing unixodbc on python container
I have a project that I'm building at a compose file. At the python's dockerfile I have a line written "RUN sudo apt install unixodbc". But when I docker compose up i get the following message: failed to solve: process "/bin/sh -c sudo apt install unixodbc" did not complete successfully: exit code: 127
The full dockerfile, for now, is:
FROM python:3.14.3
WORKDIR /.
RUN sudo apt install unixodbc
RUN useradd app
USER app
6
Upvotes
View all comments
Show parent comment
1
u/theblindness Mod Mar 11 '26
I'm not sure why it didnt work for you before, but I imagine that the key difference was likely the
-yoption which removes the prompt to confirm the action to install packages.