Hi,
I followed steps to install tomcat 10 on docker to create image butting getting error please see the details of the step and solve my problem
sudo docker pull ubunt
sudo docker run -it -d ubuntu
sudo docker exec -it cointainer_id /bin/bash
#apt-get -y install default-jdk
#groupadd tomcat
#useradd -s /bin/false -g tomcat -d /opt/tomcat tomcat
# cd /tmp
# wget https://downloads.apache.org/tomcat/tomcat-10/v10.0.0-M10/bin/apache-tomcat-10.0.0-M10.tar.gz
# mkdir /opt/tomcat
# tar xzvf apache-tomcat-*tar.gz -C /opt/tomcat --strip-components=1
#cd /opt/tomcat
#chgrp -R tomcat /opt/tomcat
#chmod -R g+r conf
#chmod g+x conf
# chown -R tomcat webapps/ work/ temp/ logs/
#nano /etc/systemd/system/tomcat.service
[Unit]
Description=Apache Tomcat Web Application Container
After=network.target
[Service]
Type=forking
Environment=JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64
Environment=CATALINA_PID=/opt/tomcat/temp/tomcat.pid
Environment=CATALINA_HOME=/opt/tomcat
Environment=CATALINA_BASE=/opt/tomcat
Environment='CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC'
Environment='JAVA_OPTS=-Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom'
ExecStart=/opt/tomcat/bin/startup.sh
ExecStop=/opt/tomcat/bin/shutdown.sh
User=tomcat
Group=tomcat
UMask=0007
RestartSec=10
Restart=always
[Install]
WantedBy=multi-user.target
#systemctl daemon-reload
Got the following ERROR
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
HI @gopinathks7,
Looking all over it seems this is related to using systemctl rather than server to start/stop services.
From what you’ve provided, I can see most of it is commented out but can you try using the following Tomcat image if you are already not :
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.