Documentation

  • 4.0
  • 10/25/2021
  • Public Content

Create New Container by Building Custom Image

Step 1: Go to Configure > Containers and Container Stacks

Select
Configure
in the top menu and select
Containers and Container Stacks
.
In the
Containers and Container Stacks
screen you will see a list of existing containers, their state and available actions. You can also search, filter and order the container list, as well as select multiple containers to apply bulk actions.
If there are no containers in the host machine, the Containers and Container Stacks screen displays a message and shortcut for adding containers.

Step 2: Build a Container Image with a Custom File

  1. In the
    Containers and Container Stacks
    screen, click on
    Configure Container Images
    .
  2. Click on
    Add Container Image
    .
  3. Assign a name to the image using the format name:tag. If you don't specify a tag, the default tag (latest) will be assigned. The example below uses:
    nginx
  4. You can use the Web editor to create a Docker* Compose file or paste Docker* Compose commands. Paste the example Docker* Compose commands below in the
    Web Editor.
    FROM nginx:mainline-alpine RUN curl https://raw.githubusercontent.com/jmandip/nginx-helloworld/main/index.html -o /usr/share/nginx/html/index.html
    If behind a proxy, add proxy environment information to the Docker* Compose file.
  5. Click on
    Build the image
    .
  6. Click on
    Continue
    . Once the image is built, it will be listed under
    Container Images
    .

Step 3: Create a Container using the Image Built with the Custom File

  1. Click on
    Back
    and go back to the
    Containers and Container Stacks
    Container Images screen.
  2. Click on
    Add Container
    .
  3. Name the container. Don't use spaces or special characters. In the screen below, it is named:
    nginx_hello_world_build
  4. Choose an existing image
    is the option selected by default, find and select the image built in the previous step using the search option.
  5. Click on
    Next
    .
    The next step is defining container settings. All configurations are optional. The instructions below will walk through defining port configuration for a container on
    port 8090
    .
  6. In
    Port Configuration
    , click on
    Publish a New Manual Network Port.
  7. In
    Host Port
    , enter 8090. In
    Mapped Container Port
    , enter 80. In
    Protocol
    , select TCP.
  8. Click on
    Next
    .
    You can review configurations and go back to edit details if any modifications are needed.
  9. Click on
    Deploy
    .
  10. Click on
    Continue
    .
    You should see a message confirming that the container is being deployed, followed by a success or failure message. Once deployment is complete, the container will be started and will show on the Containers list in the
    Containers and Container Stacks
    screen.
On the Containers page, you can see a list of icons under
Actions
like
View container logs
,
Restart
,
Start
,
Resume
,
Pause
,
Edit
,
Delete
, etc.

Step 4: Verify the container image is running

The container was configured to expose a network port, mapping the container port 80 to port 8090 in the host machine. This means that by accessing localhost:8090, you will be accessing the container ip:80.
Follow the instructions below to verify that the container is running.
In a new browser window, go to
localhost:8090
. If the container is running properly, you will see the index.html for nginx web server.

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.