Deploying existing docker image to Heroku

Enonic version: latest
OS: Ubuntu

I am unable to deploy an existing docker image to Heroku.


docker run -it --name xp-home enonic/xp-home
docker run -d -p 8080:8080 --volumes-from xp-home --name xp-app enonic/xp-app

The steps I took to do it.

heroku login
sudo heroku container:login
sudo docker tag enonic/xp-home
sudo docker push
heroku open -a hidden-mountain-63983

What Am I doing wrong here?

Thank you in advance

I did not know Heroku even supported containers, but looks like it’s a brand new feature.

Did you get any error messages?

I know, I was looking for an alternative to EC2 and found Heroku.

I am getting no app found in the logs.

Did you manage to deploy the server to Heroku?

We have not tried deploying XP to Heroku, but We’ll try to look into that in the future. :slight_smile:

1 Like


I got somewhere yesterday trying to deploy Enonic to Heroku, however I am getting an error trying to build the docker image.

The Docker file is found in the same directory as I am running the commands.

Here are the steps I took to do it.

sudo heroku container:login
sudo heroku create
sudo heroku container push web --app serene-beyond-70774 <-------------------------------------- the problem happens here

sudo heroku container:push web --app serene-beyond-70774
[sudo] password for kujim: 
=== Building web (/var/www/software/docker-enonic-app/Dockerfile)
Sending build context to Docker daemon  3.072kB
Step 1/25 : FROM enonic/java8
 ---> d2cf1f29a6ad
Step 2/25 : MAINTAINER Erik Kaareng-sunde <[email protected]>
 ---> Using cache
 ---> f243073b4a8a
Step 3/25 : ENV XP_DISTRO_VERSION 6.12.2
 ---> Using cache
 ---> 5ce191da5d75
Step 4/25 : ENV XP_ROOT /enonic-xp
 ---> Using cache
 ---> eefe62d76fff
Step 5/25 : ENV XP_HOME /enonic-xp/home
 ---> Using cache
 ---> 92ff17a1630f
Step 6/25 : ENV XP_USER enonic-xp
 ---> Using cache
 ---> 33a54ada01c2
Step 7/25 : ENV XP_UID 1337
 ---> Using cache
 ---> f1891e4829e0
Step 8/25 : RUN echo "export XP_DISTRO_VERSION=$XP_DISTRO_VERSION" >> /etc/environment
 ---> Using cache
 ---> 0540a8088ce4
Step 9/25 : RUN echo "export XP_ROOT=$XP_ROOT" >> /etc/environment
 ---> Using cache
 ---> dd1139444bbf
Step 10/25 : RUN echo "export XP_HOME=$XP_HOME" >> /etc/environment
 ---> Using cache
 ---> 4f0b280afdcd
Step 11/25 : RUN echo "export XP_USER=$XP_USER" >> /etc/environment
 ---> Using cache
 ---> 030a5680befe
Step 12/25 : RUN echo "export XP_UID=$XP_UID" >> /etc/environment
 ---> Using cache
 ---> 7def9e2aad24
Step 13/25 : RUN apt-get -y install wget zip
 ---> Using cache
 ---> 1d3843cd138f
Step 14/25 : RUN wget -O /tmp/distro-$$XP_DISTRO_VERSION/distro-$
 ---> Using cache
 ---> 9030378630f3
Step 15/25 : RUN cd /tmp ; unzip distro-$
 ---> Using cache
 ---> 505d035b98c3
Step 16/25 : RUN mv /tmp/enonic-xp-$XP_DISTRO_VERSION/home /tmp/enonic-xp-$XP_DISTRO_VERSION/
 ---> Using cache
 ---> 0a50a838259b
Step 17/25 : RUN mkdir -p $XP_ROOT
 ---> Using cache
 ---> 3dec242ad9d5
Step 18/25 : RUN cp -rf /tmp/enonic-xp-$XP_DISTRO_VERSION/* $XP_ROOT/.
 ---> Using cache
 ---> 132517e086ee
Step 19/25 : RUN adduser --home $XP_ROOT --gecos "" --no-create-home --UID $XP_UID --disabled-password $XP_USER
 ---> Using cache
 ---> 09900ec4b13c
Step 20/25 : RUN chown -R $XP_USER $XP_ROOT
 ---> Using cache
 ---> 8f5a587476a0
Step 21/25 : ADD /
ADD failed: stat /var/lib/docker/tmp/docker-builder794986048/ no such file or directory
 ▸    Error: docker build exited with 1

It reaches the step 21 only to exist with an error.

Does it tell anything to you?

I am not familiar on writing Dockerfiles :grin: