run this container from the root of your maven project.
docker run -it --rm -v "$(pwd)/dependencies":/root/.m2 -v "$(pwd)":/usr/src/mymaven -w /usr/src/mymaven maven mvn dependency:go-offline
All dependencies will be downloaded in this directory
tree -L 2 dependencies
dependencies
├── copy_reference_file.log
├── repository
│ ├── aopalliance
│ ├── asm
│ ├── backport-util-concurrent
│ ├── classworlds
│ ├── com
│ ├── commons-beanutils
│ ├── commons-cli
│ ├── commons-codec
│ ├── commons-collections
│ ├── commons-digester
│ ├── commons-io
│ ├── commons-lang
│ ├── commons-logging
│ ├── commons-validator
│ ├── io
│ ├── jakarta
│ ├── javax
│ ├── jline
│ ├── junit
│ ├── log4j
│ ├── org
│ ├── oro
│ ├── software
│ ├── xml-apis
│ ├── xmlpull
│ └── xpp3
└── settings-docker.xml