postgresql - Add postgres to a Codenvy Stack Recipe (dockerfile) -


i new codenvy user. attempting build "stack" in codenvy run postgres.

i creating stack using following recipe. (using https://github.com/eclipse/che-dockerfiles/blob/master/recipes/ubuntu_jdk8/dockerfile starting point)

this recipe creates codenvy server containing eclipse che, maven, , tomcat.

i need add ant , postgres configuration. able add ant. current challenge adding postgres configuration.

here current recipe.

from eclipse/stack-base:ubuntu expose 4403 8000 8080 9876 22  label che:server:8080:ref=tomcat8 che:server:8080:protocol=http  che:server:8000:ref=tomcat8-debug che:server:8000:protocol=http  che:server:9876:ref=codeserver che:server:9876:protocol=http  env maven_version=3.3.9 \     ant_version=1.10.1 \     java_home=/usr/lib/jvm/java-1.8.0-openjdk-amd64 \     tomcat_home=/home/user/tomcat8 \     term=xterm env m2_home=/home/user/apache-maven-$maven_version env ant_home=/home/user/ant-$ant_version env path=$java_home/bin:$m2_home/bin:$ant_home/bin:$path  run mkdir /home/user/tomcat8 /home/user/apache-maven-$maven_version  $ant_home && \     wget -qo- "https://www.apache.org/dist/ant/binaries/apache-ant-$ant_version-bin.tar.gz" | tar -zx --strip-components=1 -c $ant_home && \     wget -qo- "http://apache.ip-connect.vn.ua/maven/maven-3/$maven_version/binaries/apache-maven-$maven_version-bin.tar.gz" | tar -zx --strip-components=1 -c /home/user/apache-maven-$maven_version/ && \     wget -qo- "http://archive.apache.org/dist/tomcat/tomcat-8/v8.0.24/bin/apache-tomcat-8.0.24.tar.gz" | tar -zx --strip-components=1 -c /home/user/tomcat8 && \     rm -rf /home/user/tomcat8/webapps/* && \     echo "export maven_opts=\$java_opts" >> /home/user/.bashrc 

i found sample dockerfile installs postgres following command

run apt-get update && apt-get install -y ant git postgresql-client postgresql-contrib 

when add codenvy stack recipe, see failure when attempt start workspace.

[docker] step 13/13 : run apt-get update && apt-get install -y ant git postgresql-client postgresql-contrib [docker] ---> running in 672fc2aac027 [docker] reading package lists... [docker]  [docker] [91me: list directory /var/lib/apt/lists/partial missing. - acquire (13: permission denied) [0m [docker] removing intermediate container 672fc2aac027 [docker]  [docker] [error] failed build image: command '/bin/sh -c apt-get update && apt-get install -y ant git postgresql-client postgresql-contrib' returned non-zero code: 100 

what proper way install postgres in environment? once installed, how ensure postgres service started?

one of primary benefits of docker not re-inventing wheel. should use official postgresql image.

if base postgresql image not sufficient needs, inherit , add whatever need on top.

as general rule, if ever building image off ubuntu, think twice because may using wrong tool job.


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -