Hippo Docker on Ubuntu & CentOS

2017 春节为了准备17年的项目安排开始尝试恢复Hippo Docker,但是原先的Ubuntu因为空间的问题所以准备重新折腾


先装了Ubuntu14.04,因为这个是我下载的版本,后来在装Hippo Docker的时候才发现原来新的版本的Ubuntu已经是16.04了,折腾了几天升级台式机和笔记本电脑中的虚拟机环境里面的Ubuntu.


升级Ubuntu用的命令是 sudo update-manager -d;sudo do-release-update


后来的CentOS的安装过程颇为坎坷,装好后怎么也没发联网。后来干脆装了个只有命令行的版本。


然后用了同一个Dockerfile成功build成了Hippo的Docker IMG.


sudo docker build -t=”hippo/demo” .


Dockerfile:

# Generic Hippo Docker image
FROM ubuntu:16.04
MAINTAINER Brian Snijders <brian@finalist.nl>


# Set environment variables
ENV PATH /srv/hippo/bin:$PATH
ENV HIPPO_FILE HippoCMS-GoGreen-Enterprise-7.9.4.zip
ENV HIPPO_FOLDER HippoCMS-GoGreen-Enterprise-7.9.4
ENV HIPPO_URL http://download.demo.onehippo.com/7.9.4/HippoCMS-GoGreen-Enterprise-7.9.4.zip


# Create the work directory for Hippo
RUN mkdir -p /srv/hippo


# Add Oracle Java Repositories
RUN DEBIAN_FRONTEND=noninteractive apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y software-properties-common
RUN DEBIAN_FRONTEND=noninteractive add-apt-repository ppa:webupd8team/java
RUN DEBIAN_FRONTEND=noninteractive apt-get update


# Approve license conditions for headless operation
RUN echo debconf shared/accepted-oracle-license-v1-1 select true |  debconf-set-selections
RUN echo debconf shared/accepted-oracle-license-v1-1 seen true |  debconf-set-selections


# Install packages required to install Hippo CMS
RUN DEBIAN_FRONTEND=noninteractive apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y oracle-java7-installer --fix-missing
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y oracle-java7-set-default
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y curl
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y dos2unix
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y unzip


# Install Hippo CMS, retrieving the GoGreen demonstration from the $HIPPO_URL and putting it under $HIPPO_FOLDER
RUN curl -L $HIPPO_URL -o $HIPPO_FILE
RUN unzip $HIPPO_FILE
RUN cp -r /$HIPPO_FOLDER/tomcat/* /srv/hippo
RUN chmod 700 /srv/hippo/* -R


# Replace DOS line breaks on Apache Tomcat scripts, to properly load JAVA_OPTS
RUN dos2unix /srv/hippo/bin/setenv.sh
RUN dos2unix /srv/hippo/bin/catalina.sh


# Expose ports
EXPOSE 8080


# Start Hippo
WORKDIR /srv/hippo/
CMD ["catalina.sh", "run"]


已发布

分类

来自

标签: