Skip to content

Commit 9ec2ee0

Browse files
Reduced image size of Docker image (#7675)
1 parent 117e35d commit 9ec2ee0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Diff for: Dockerfile

+7-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1919
# IN THE SOFTWARE.
2020

21-
FROM python:3.11-alpine3.19
21+
FROM python:3.11-alpine3.19 AS build
2222

2323
# Build-time flags
2424
ARG WITH_PLUGINS=true
@@ -91,6 +91,12 @@ RUN \
9191
&& \
9292
git config --system --add safe.directory /site
9393

94+
# From empty image
95+
FROM scratch
96+
97+
# Copy all from build
98+
COPY --from=build / /
99+
94100
# Set working directory
95101
WORKDIR /docs
96102

0 commit comments

Comments
 (0)