Optimize build caching
Before this commit, if docker-entrypoint or any file in mailman-web changed, the Docker build cache would not be used, so the install of dependencies would run again, uselessly
This commit is contained in:
@@ -2,9 +2,6 @@
|
||||
# Use 3.15 for Core since it has Python 3.9
|
||||
FROM alpine:3.18
|
||||
|
||||
#Add startup script to container
|
||||
COPY docker-entrypoint.sh /usr/local/bin/
|
||||
|
||||
# Add requirements file.
|
||||
COPY requirements.txt /tmp/
|
||||
|
||||
@@ -25,6 +22,9 @@ RUN --mount=type=cache,target=/root/.cache \
|
||||
&& apk del build-deps \
|
||||
&& adduser -S mailman
|
||||
|
||||
#Add startup script to container
|
||||
COPY docker-entrypoint.sh /usr/local/bin/
|
||||
|
||||
# Change the working directory.
|
||||
WORKDIR /opt/mailman
|
||||
|
||||
|
||||
Reference in New Issue
Block a user