{"id":38,"date":"2017-02-03T21:11:00","date_gmt":"2017-02-03T13:11:00","guid":{"rendered":"https:\/\/bh4bqi.cn\/?p=38"},"modified":"2022-09-26T21:29:02","modified_gmt":"2022-09-26T13:29:02","slug":"hippo-docker-on-ubuntu-centos","status":"publish","type":"post","link":"https:\/\/bh4bqi.cn\/?p=38","title":{"rendered":"Hippo Docker on Ubuntu &#038; CentOS"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">2017 \u6625\u8282\u4e3a\u4e86\u51c6\u590717\u5e74\u7684\u9879\u76ee\u5b89\u6392\u5f00\u59cb\u5c1d\u8bd5\u6062\u590dHippo Docker\uff0c\u4f46\u662f\u539f\u5148\u7684Ubuntu\u56e0\u4e3a\u7a7a\u95f4\u7684\u95ee\u9898\u6240\u4ee5\u51c6\u5907\u91cd\u65b0\u6298\u817e\u2029<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5148\u88c5\u4e86Ubuntu14.04\uff0c\u56e0\u4e3a\u8fd9\u4e2a\u662f\u6211\u4e0b\u8f7d\u7684\u7248\u672c\uff0c\u540e\u6765\u5728\u88c5Hippo Docker\u7684\u65f6\u5019\u624d\u53d1\u73b0\u539f\u6765\u65b0\u7684\u7248\u672c\u7684Ubuntu\u5df2\u7ecf\u662f16.04\u4e86\uff0c\u6298\u817e\u4e86\u51e0\u5929\u5347\u7ea7\u53f0\u5f0f\u673a\u548c\u7b14\u8bb0\u672c\u7535\u8111\u4e2d\u7684\u865a\u62df\u673a\u73af\u5883\u91cc\u9762\u7684Ubuntu.\u2029<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5347\u7ea7Ubuntu\u7528\u7684\u547d\u4ee4\u662f sudo update-manager -d\uff1bsudo do-release-update\u2029<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u540e\u6765\u7684CentOS\u7684\u5b89\u88c5\u8fc7\u7a0b\u9887\u4e3a\u574e\u5777\uff0c\u88c5\u597d\u540e\u600e\u4e48\u4e5f\u6ca1\u53d1\u8054\u7f51\u3002\u540e\u6765\u5e72\u8106\u88c5\u4e86\u4e2a\u53ea\u6709\u547d\u4ee4\u884c\u7684\u7248\u672c\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2029\u7136\u540e\u7528\u4e86\u540c\u4e00\u4e2aDockerfile\u6210\u529fbuild\u6210\u4e86Hippo\u7684Docker IMG.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2029sudo docker build -t=&#8221;hippo\/demo&#8221; .\u2029<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>Dockerfile:<\/em><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code># Generic Hippo Docker image\nFROM ubuntu:16.04\nMAINTAINER Brian Snijders &lt;brian@finalist.nl>\u2029\n\n# Set environment variables\nENV PATH \/srv\/hippo\/bin:$PATH\nENV HIPPO_FILE HippoCMS-GoGreen-Enterprise-7.9.4.zip\nENV HIPPO_FOLDER HippoCMS-GoGreen-Enterprise-7.9.4\nENV HIPPO_URL http:\/\/download.demo.onehippo.com\/7.9.4\/HippoCMS-GoGreen-Enterprise-7.9.4.zip\u2029\n\n# Create the work directory for Hippo\nRUN mkdir -p \/srv\/hippo\u2029\n\n# Add Oracle Java Repositories\nRUN DEBIAN_FRONTEND=noninteractive apt-get update\nRUN DEBIAN_FRONTEND=noninteractive apt-get install -y software-properties-common\nRUN DEBIAN_FRONTEND=noninteractive add-apt-repository ppa:webupd8team\/java\nRUN DEBIAN_FRONTEND=noninteractive apt-get update\u2029\n\n# Approve license conditions for headless operation\nRUN echo debconf shared\/accepted-oracle-license-v1-1 select true |\u00a0 debconf-set-selections\nRUN echo debconf shared\/accepted-oracle-license-v1-1 seen true |\u00a0 debconf-set-selections\u2029\n\n# Install packages required to install Hippo CMS\nRUN DEBIAN_FRONTEND=noninteractive apt-get update\nRUN DEBIAN_FRONTEND=noninteractive apt-get install -y oracle-java7-installer --fix-missing\nRUN DEBIAN_FRONTEND=noninteractive apt-get install -y oracle-java7-set-default\nRUN DEBIAN_FRONTEND=noninteractive apt-get install -y curl\nRUN DEBIAN_FRONTEND=noninteractive apt-get install -y dos2unix\nRUN DEBIAN_FRONTEND=noninteractive apt-get install -y unzip\u2029\n\n# Install Hippo CMS, retrieving the GoGreen demonstration from the $HIPPO_URL and putting it under $HIPPO_FOLDER\nRUN curl -L $HIPPO_URL -o $HIPPO_FILE\nRUN unzip $HIPPO_FILE\nRUN cp -r \/$HIPPO_FOLDER\/tomcat\/* \/srv\/hippo\nRUN chmod 700 \/srv\/hippo\/* -R\n\n\u2029# Replace DOS line breaks on Apache Tomcat scripts, to properly load JAVA_OPTS\nRUN dos2unix \/srv\/hippo\/bin\/setenv.sh\nRUN dos2unix \/srv\/hippo\/bin\/catalina.sh\u2029\n\n# Expose ports\nEXPOSE 8080\u2029\n\n# Start Hippo\nWORKDIR \/srv\/hippo\/\nCMD &#91;\"catalina.sh\", \"run\"]<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u2029<\/p>\n","protected":false},"excerpt":{"rendered":"<p>2017 \u6625\u8282\u4e3a\u4e86\u51c6\u590717\u5e74\u7684\u9879\u76ee\u5b89\u6392\u5f00\u59cb\u5c1d\u8bd5\u6062\u590dHippo Docker\uff0c\u4f46\u662f\u539f\u5148\u7684Ubuntu\u56e0\u4e3a\u7a7a\u95f4\u7684\u95ee [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-38","post","type-post","status-publish","format-standard","hentry","category-website"],"_links":{"self":[{"href":"https:\/\/bh4bqi.cn\/index.php?rest_route=\/wp\/v2\/posts\/38","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bh4bqi.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bh4bqi.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bh4bqi.cn\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/bh4bqi.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=38"}],"version-history":[{"count":1,"href":"https:\/\/bh4bqi.cn\/index.php?rest_route=\/wp\/v2\/posts\/38\/revisions"}],"predecessor-version":[{"id":39,"href":"https:\/\/bh4bqi.cn\/index.php?rest_route=\/wp\/v2\/posts\/38\/revisions\/39"}],"wp:attachment":[{"href":"https:\/\/bh4bqi.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=38"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bh4bqi.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=38"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bh4bqi.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=38"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}