FROM ubuntu:latest
RUN apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository ppa:gluster/glusterfs-9 && \
apt-get update && \
apt-get install -y glusterfs-server
CMD ["/usr/sbin/init"]
Using this, the container starts perfectly... However the service being installed (Gluster) doesn't start.
I've tried combinations of RUN, CMD, & ENTRYPOINT scripts executing variations of "service glusterd start" (the command to start the Gluster daemon) but those combinations:
I can confirm "service glusterd start" is the correct command that needs to be run, as:
Any ideas on how to execute "service glusterd start" at the container creation in the dockerfile?
Real credit goes to DaveMaze in the comments... His note about service/systemctl and CMD lead me down a path that ended up working:
FROM ubuntu:latest
RUN apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository ppa:gluster/glusterfs-9 && \
apt-get update && \
apt-get install -y glusterfs-server
CMD glusterd -N
Works perfectly.