Run a MicroProfile Microservice on OpenLiberty in a Remote development container in Visual Studio Code

In this blog post I want to show, how to setup a local remote Java development container for Eclipse MicroProfile with OpenLiberty in Visual Studio Code.

I did that for the Authors microservice from the Cloud Native Starter project with MicroProfile 3.2, OpenJDK Java 11, and the latest OpenLiberty version.

That blog post is structured in:

  • Setup and configuration of Visual Studio Code
  • Run the Authors microservice in the remote development container
  • Debug the Authors microservice in the remote development container

The documentation of remote development with Video Studio Code is here and Java Dev Environments with Containers is a great blog post, which does also cover the remote development with container.

Continue reading

How to develop a customized Dockerfile using minikube

In this blog post I want to share an awesome and simple practice for beginners: How to develop a customized Dockerfile for a container image running on Kubernetes, using minikube.

Usually, when you use an existing container image to create your own customized configuration, you don’t have deep knowledge how that container image is built, and you have questions like: “What are the folder rights?”, or “What are the installation paths of applications?”, or other information you need to customize the container image to your needs.

You can learn about the existing image, when you visit the GitHub or Dockerhub project of that image (for example: links to GitHub “docker-library / repo-info” and Dockerhub “jenkins repo-info” project of Jenkins). But to ensure that your customization works, you have to run and access the running container in the commandline mode and verify your changes step by step running the image in Kubernetes.

Minikube comes with a container engine you can use. So minikube has all you need to build and run your container image on a local Kubernetes installation.

Here are the steps to customize a Jenkins container image I want to run on minikube, you can try it out:

1. Install minikube

Continue reading

Definition of a Dockerfile to use bash scripts on a Windows 10 machine for our Cloud-Native-Starter workshop

We defined a Dockerfile to create a Docker image for our Cloud-Native-Starter workshop especially for Windows 10 users. The users can now simply create a Docker image on the local Windows 10 machine and then follow the guided steps in the hands-on workshop documentation and use the bash scripts. The reason why we don’t build a Docker image and share the image on Dockerhub is, we want to provide users the freedom of own customizations.

These are some challenges we had during the testing of the Dockerfile definition:

  • File sharing for Docker images on Windows
  • Docker port forwarding
  • Docker in Docker
  • Istio Virtual service configuration
  • Linux tools missing

Continue reading

How to build a container

I want to describe another way to run the  Highscores-Service of the #BlueCloudMirror game . In the game I use  IBM Cloud Foundry apps, now I want to explore IBM Cloud Kubernetes.

Note: The #BlueCloudMirror game we  @Niklas, @Harald and I made, is available as an Pattern on IBM Developer.

Let’s get started with the first step, building a container which contains the Scores-Service using Docker .

This blog post is all about building and running a docker container on a local machine.

Topics you will find in this post: my experience of  learning how configure a Dockerfile along  with my creation of the Dockerfile for the score-service, including following steps:

  • Choosing the base image
  • Installing the needed packaging tools
  • Defining the source code location and copying the source code into the container
  • Configuring a new user and group for Bower , a package manager
  • Setting up the Score-Service
  • Running the Score-Service container locally

Note: This is not a blueprint, this is just how I did it and I share my experience with you.

Architecture of the Scores-Service

This is the relevant architecture for building the Docker container.  The Scores-Service UI and the Scores Core Service will run in the Docker container locally. The Cloudant service still runs on IBM Cloud.

scores-service-docker

 

Continue reading