Feedback

Chat Icon

DevSecOps in Practice

A Hands-On Guide to Operationalizing DevSecOps at Scale

Setting Up the Foundation: Docker Images and Registry
38%

Docker Images

Before deploying our microservices containers, we need to create Docker images for them. Start by creating a Dockerfile for the menu service:

cat <$HOME/RestQR/menu/Dockerfile
FROM python:3.9-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
CMD ["python", "app.py"]
EOF

Create a Dockerfile for the qr service:

cat <$HOME/RestQR/qr/Dockerfile
FROM python:3.9-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
CMD ["python", "app.py"]
EOF

Since the menu service requires a PostgreSQL database, we need to create a Dockerfile for the database. We are going to use the Bitnami PostgreSQL image since we are going to deploy the database using Helm later in this guide:

DevSecOps in Practice

A Hands-On Guide to Operationalizing DevSecOps at Scale

Enroll now to unlock current content and receive all future updates for free. Your purchase supports the author and fuels the creation of more exciting content. Act fast, as the price will rise as the course nears completion!