I need to create a custom docker image with Cockpit and ubuntu. But I can't start the service and expose it once it has been installed.
FROM ubuntu:latest
ENV DEBIAN_FRONTEND=noninteractive TZ=Australia/Brisbane
RUN apt-get update -qq -y && apt-get upgrade -y && \
apt-get install -y curl net-tools && \
apt-get install -y cockpit
EXPOSE 9090
CMD [ "command to run and expose cockpit" ]
I tried with:
service cockpit.socket start && tail -f /dev/null
# And
service cockpit start && tail -f /dev/null
Error: Service not found: cockpit.socket
And also with:
CMD [ "cockpit" ]
Error: Command not found
Also it seems I can't use systemctl in a docker Image.