# Multi Stage Docker Builds

Source: https://forum.modalai.com/topic/507/multi-stage-docker-builds
Category: General Questions (https://forum.modalai.com/category/2/general-questions)
Posted: 2021-10-20 12:32:12 UTC by kasarrowtec
Replies: 2 · Views: 900

## kasarrowtec · 2021-10-20 12:32:12 UTC

Hi,

I am trying to do a multi stage docker build as my current docker image is too large but it seems that it is not possible with my current dockerfile. 
I start with 

 FROM arm64v8/ubuntu:latest as BUILDER

and it is unable to pull the image from docker.

I also tried just 
FROM arm64v8/ubuntu:latest
then when i need to copy the compiled file over in the next part using -
COPY --from=0 
(0 being the first build)
and i am returned with an error stating the --from parameter doesnt exist in voxl-docker.

Does voxl-docker support multi stage deployment and if so how would i go about it ? or any useful tips ?

Best regards

## Reply by Chad Sweet (ModalAI staff) · 2021-10-20 15:59:11 UTC

Some folks have used the SD Card, though it's really slow. The recommended approach would be to build it off target, compress it, then copy it over to target

## Reply by modaltb (ModalAI staff) · 2021-10-20 15:59:48 UTC

I didn't know Docker had this feature, so thanks for that tip!

Docker built on VOXL is running at version `1.9.0` and from some articles I read it looks like multistage build started in `17.06` (https://docs.docker.com/engine/release-notes/prior-releases/)

So I don't believe this is supported.
