How to reduce the size of parse-server docker image after installing node modules


The latest official parse-server docker image no longer contains S3 File Adapter according to this post. So I am creating a new image. My Dockerfile –

FROM parseplatform/parse-server

USER root

WORKDIR /parse-server

RUN npm install --save @parse/s3-files-adapter

USER node

After building –

docker build -t my_parse .

The resulting docker image is twice the size of the original image.

# docker images -a
REPOSITORY                   TAG       IMAGE ID       CREATED              SIZE
my_parse                     latest    763968cef685   21 seconds ago       565MB
<none>                       <none>    1e92933e370e   23 seconds ago       565MB
<none>                       <none>    8778c6ebc0f7   About a minute ago   247MB
<none>                       <none>    46a2805beb06   About a minute ago   247MB
parseplatform/parse-server   latest    0492a55f2c59   24 hours ago         247MB

How do I reduce the size of my_parse image and also get rid of the none images?

Source: Docker Questions

Categorised as docker, npm-install, parse-server Tagged , ,


Leave a Reply

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us