Fixed buildx issue
This commit is contained in:
14
Dockerfile
14
Dockerfile
@@ -45,6 +45,12 @@ RUN mkdir -p /opt/postfix-libs \
|
||||
| sort -u \
|
||||
| xargs -r -I '{}' cp -v --parents '{}' /opt/postfix-libs
|
||||
|
||||
RUN cd /opt/postfix-dist \
|
||||
&& tar -cf /opt/postfix-dist.tar .
|
||||
|
||||
RUN cd /opt/postfix-libs \
|
||||
&& tar -cf /opt/postfix-libs.tar .
|
||||
|
||||
# Final image
|
||||
FROM ubuntu:24.04
|
||||
|
||||
@@ -61,8 +67,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ssl-cert \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY --from=builder /opt/postfix-dist/ /
|
||||
COPY --from=builder /opt/postfix-libs/ /
|
||||
COPY --from=builder /opt/postfix-dist.tar /tmp/postfix-dist.tar
|
||||
COPY --from=builder /opt/postfix-libs.tar /tmp/postfix-libs.tar
|
||||
|
||||
RUN tar -C / -xf /tmp/postfix-dist.tar \
|
||||
&& tar -C / -xf /tmp/postfix-libs.tar \
|
||||
&& rm -f /tmp/postfix-dist.tar /tmp/postfix-libs.tar
|
||||
|
||||
# Create postfix user and group
|
||||
RUN groupadd -r postfix \
|
||||
|
||||
Reference in New Issue
Block a user