Skip to content

Commit

Permalink
Merge branch 'docker-build-alpine' into 'main'
Browse files Browse the repository at this point in the history
Switch base image to alpine, install updates and perform cleanup

See merge request clay/ddns-cloudflare!10
  • Loading branch information
clayoster committed Oct 13, 2024
2 parents 3fd0fc8 + 3823ef4 commit 8cc717e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
# Use an official Python runtime as a parent image
FROM python:3.12-slim
FROM python:3.12-alpine

# Set the working directory in the container
WORKDIR /app

# Copy the current directory contents into the container at /app
COPY . /app

# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Install available updates and python packages from requirements.txt
RUN set -ex \
&& apk upgrade --available --no-cache \
&& rm -rf /var/cache/apk/* \
&& pip install --no-cache-dir -r requirements.txt \
&& pip cache purge

# Make port 80 available to the world outside this container
EXPOSE 8080

# Allow stdout from python app through to docker logs
Expand Down

0 comments on commit 8cc717e

Please sign in to comment.