简体   繁体   中英

camel - how to move files outside docker container

I have a spring boot application inside a container and I use camel to read some files, but I need to tell camel that start reading outside the container and later move the same file to a specific path that is also outside the container, can someone help me?,

This is my code:

@Component
public class Controlador extends RouteBuilder {

    @Autowired
    Procesador objProcesador;

    @Override
    public void configure() throws Exception {
        from("ftp://user@ip:port?password=password&passiveMode=true&delete=true").streamCaching().convertBodyTo(InputStream.class).process(objProcesador).to("/var/lib");
    }

}

Thanks in advance

What do you mean by outside a container? If you mean a path on the host running the container you need to share that path as a volume. Set the volume when you use "docker run.." or in your Dockerfile. If you mean Camel should fetch a file via ftp or sftp ensure the container can access that site first.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM