Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create buildingDockerImage-AMI3.md #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ambarishK
Copy link

@ambarishK ambarishK commented Sep 16, 2019

Documentation over building docker images of ami3.

Installation of Docker over local machine.

Installation of Docker over Ubuntu (debian binaries).

  • Step 1: Update the apt package index.
$ sudo apt-get update

  • Step 2: Install the latest version of Docker Engine - Community and containerd.
$ sudo apt-get install docker-ce docker-ce-cli containerd.io
  • Step 3: Verify that Docker Engine - Community is installed correctly by running the hello-world image.
$ sudo docker run hello-world

Installation of Docker over CentOS (RedHat binaries).

  • Step 1: Install the latest version of Docker Engine - Community and containerd.
$ sudo yum install docker-ce docker-ce-cli containerd.io
  • Step 2: Start docker and verify that Docker Engine - Community is installed correctly by running the hello-world image.
$ sudo systemctl start docker

$ sudo docker run hello-world

Write Dockerfile for ami3.

  • Make dockerfile for ami3
$ gedit ami3dockerfile

Mention following docker commands over ami3dockerfile.

FROM rtfpessoa/ubuntu-jdk8

ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get install tzdata
RUN apt-get install -y \
    maven \
    python3.7 \
    python3-pip 

ADD ami3 /usr/src/ami3
ADD requirements.txt /usr/src/requirements.txt

WORKDIR /usr/src/ami3
RUN mvn install -Dmaven.test.skip=true

WORKDIR /usr/src
RUN python3.7 -m pip install -r requirements.txt

ENV PATH="/usr/src/ami3/target/appassembler/bin:/usr/src:${PATH}"
ENV FORESTPLOT_USE_DOCKER="no"

  • Details of the contained files and directories into the dockerfile.
  1. ami3 - cloned ami3 repository.
  2. requirements.txt - text file containing all required python libraries - requirements.txt.
  3. /usr/src - working directory within the built ami3 image.

Build the ami3 docker image ( common steps for Ubuntu as well as CentOS ).

$ docker build -f /path/to/ami3dockerfile .

Description of build ami3 docker image.

  ---> 9dcc305c0054
Successfully built 9dcc305c0054

[root@localhost CEVOpen]# docker image ls
REPOSITORY              TAG                 IMAGE ID            CREATED             SIZE
<none>                  <none>              9dcc305c0054        44 seconds ago      1.57GB'

  • Renaming the REPOSITORY
[root@localhost CEVOpen]# docker tag 9dcc305c0054 ami3docker:latest

[root@localhost CEVOpen]# docker image ls

REPOSITORY              TAG                 IMAGE ID            CREATED             SIZE
ami3docker              latest              9dcc305c0054        14 minutes ago      1.57GB

Test run the ami3 docker image.

  • Run ami3docker container.
[root@localhost CEVOpen]# docker run -i -t ami3docker:latest 
root@90250c967ca1:/usr/src# ls
ami3  requirements.txt

  • Test run of ami3 tools - ami-pdf
root@90250c967ca1:/usr/src# ami-pdf
Usage: ami-pdf [OPTIONS]
Description
===========
Convert PDFs to SVG-Text, SVG-graphics and Images. Does not process images,
graphics or text.often followed by ami-image and ami-xml?
Options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant