Reputation: 36
I have a docker compose file and want to install maven inside nimbus container once the container is created. I added docker-entrypoint.sh file to compose image but not sure if this is the write way to override entrypoint file
docker-compose file
image: storm:2.1.0
container_name: nimbus
entrypoint: /docker-entrypoint.sh
docker-entrypoint.sh
#!/bin/bash
set -e
# fi
#install nano
apt update
apt install nano
#install ping
apt-get install iputils-ping
#installmaven
apt install maven
exec "$@"
Upvotes: 1
Views: 531
Reputation: 1637
Create a Dockerfile
FROM image: storm:2.1.0
RUN apt update
RUN apt install nano
RUN apt-get install iputils-ping
RUN apt install maven
Build image using this docker file :
docker build -t image-1:v1 -f Dockerfile .
Use this image name in your docker compose file :
image: image-1:v1
container_name: nimbus
Upvotes: 1