DEV Community

Fernando Tricas García
Fernando Tricas García

Posted on

2 1

Running a project in podman (example)

As discused in my previous post So, you want to write your first container? I was not able to run Docker in my Fedora system.
Somebody recommended me to test podman. I installed it (sudo dnf install podman) read Transitioning from Docker to Podman and started changing my Dockerfile. Main changes are the image (fedora), the instructions for updating and installing needed software and it worked fine:

# our base image
FROM fedora

#RUN  sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys <PUBKEY>
# Download latest listing of available packages:
RUN dnf update
# Upgrade already installed packages:
#RUN apt -y upgrade
# Install a new package:
RUN dnf install python python-pip
RUN dnf install libxml2 libxslt

# Install python and pip
#RUN apt -y install py-pip

# upgrade pip
RUN pip install --upgrade pip

## install Python modules needed by the Python app
#COPY requirements.txt /usr/src/app/
#RUN pip install --no-cache-dir -r /usr/src/app/requirements.txt

# copy files required for the app to run
COPY socialModules /usr/src/app/socialModules
RUN pip install --no-cache-dir -r /usr/src/app/socialModules/requirements.txt


# tell the port number the container should expose
EXPOSE 5000

# run the application
CMD ["/usr/bin/python", "/usr/src/app/socialModules/moduleTwitter.py"]
Enter fullscreen mode Exit fullscreen mode

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more