Create a container with Oracle JET app in it


We’re gonna create a container and then push to a repo for later use.

First we create the local app and test it:

cd

mkdir myjetappcontainer

npm install -g @oracle/ojet-cli

ojet create myjetapp --template=navdrawer

cd myjetapp

ojet serve (test it and then CTRL+C)

Now let’s create the container, fisrt the Dockerfile:

vi Dockerfile
FROM oraclelinux:7-slim

WORKDIR /app

ADD . /app

RUN curl --silent --location https://rpm.nodesource.com/setup_4.x | bash -

RUN yum -y install nodejs npm

RUN npm install -g @oracle/ojet-cli

EXPOSE 8000

CMD ["ojet","serve"]

And now lets build and push the container to a repo:

docker build -t myjetapp .

docker login

docker push javiermugueta/myjetapp

 

Enjoy 😉

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.