From e8a62b43554e64d9ed7f6f9d20cd280de6e1dfae Mon Sep 17 00:00:00 2001 From: Maxence Date: Fri, 21 Apr 2023 15:40:33 -0400 Subject: [PATCH] Use nginx to serve built files --- Dockerfile | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2e71e6cb2..723f57c29 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,11 +12,8 @@ RUN npm run build #--------------------------------------------------------------------------- -# Create a clean python-based image with just the build results -FROM python:3-slim -WORKDIR /maputnik +# Create a clean nginx-alpine image with just the build results -COPY --from=builder /maputnik/build/build . +FROM nginx:alpine -EXPOSE 8888 -CMD python -m http.server 8888 +COPY --from=builder /maputnik/build/build /usr/share/nginx/html/