The production of images started by abnormal applications is actually to make some program images that are not installed by rpm by default.
At present, many on the market are started from jar packages, so the startup method cannot be performed as normal.
The following will show two examples of image making:
The first way:
build.sh
#!/bin /bash
docker build -t docker.anyonedev.com/public/httpd:2.4.6 .
docker push docker.anyonedev.com/public/httpd:2.4.6
httpd-foreground
#!/bin/sh
set -e
# Apache gets grumpy about PID files pre-existing
rm -f /usr /local/apache2/logs/httpd.pid
exec httpd -DFOREGROUND
Dockerfile
FROM docker.anyonedev.com/public/centos:7.4. 1708
ENV TZ "Asia/Shanghai"
RUN yum install -y httpd-2.4.6-89.el7.centos
EXPOSE 80
COPY httpd-foreground /usr/local/bin/
CMD ["httpd-foreground"]
The second way: