Error: Node Sass does not yet support your current environment: OS X 64-bit with Unsupported runtime (83) … using a remote development container to run the Vue.js application

In this blog post I want to show, how to setup a remote development container for a Vue.js application, which isn’t able to run on my local machine, even after the update of Node.js, npm and yarn.

I still get the error which is shown in the following image and it seems this error is related to the installed MacOS version 10.15.5.

vue-remote-01

To be able to work with the Vue.js project, I use now the remote container development functionality in Visual Studio Code as a workaround . This is very close to my blog post “Run a MicroProfile Microservice on OpenLiberty in a Remote development container in Visual Studio Code”.

You can follow the steps of the setup of the workaround for the “OS X 64-bit with Unsupported runtime (83)” problem.

SETUP AND CONFIGURATION

Ensure you have installed Docker Desktop on your local machine.

Step 1: Install the following extensions in Visual Studio Code

Step 2: Open in your Visual Studio Code workspace the remote containers extension window (“Open a remote window“)

vsc-remote-java-dev-00

Step 3: Start “Remote Containers: Add Development Container Configuration Files …” and select a container as a starting point, here I use the Node 14 container definition (you can customize the “Dockerfile” to your needs). The container configuration in the Dockerfile contains Node.js, npm and yarn , which I need for the Vue.js development.
The gif below shows the steps.

vue-remote-2

Step 4: Verify the newly created folder “.devcontainer” and related files “devcontainer.json” and “Dockerfile”.

vue-remote-02

Step 5: I my case I only need to customize the “devcontainer.json” file to expose the port  8080, to access my Vue.js application in a local browser.

vue-remote-03

Step 6: Now open the local folder with “Remote Containers: Open Folder in container” in the remote development container. That will map the local folder as volume to the remote development container and code changes will be saved on your local file system and start the Vue.js development.

In the gif you see:

  • Start “Remote Containers: Open Folder in container”
  • Select a folder and open a terminal session in that folder
  • Execute “yarn serve”  in the terminal session
  • See is works the application is running and can be accessed in a local browser using URL “http://localhost:8080″

vue-remote-3


I hope this was useful for you and let’s see what’s next?

Greetings,

Thomas

#Docker, #Container, #Vuejs, #VisualStudioCode, #RemoteDevelopment

 

Getting started to secure a simple Java Microservice with Keycloak, MicroProfile and OpenLiberty

Run a PostgreSQL container as a non-root user in OpenShift

In this blog post I want to point out a simple topic: How to run a simple PostgreSQL Docker image as a non-productive container in OpenShift? As you maybe know, OpenShift doesn’t allow by default to run container images as root.

The image below shows the result of the simply deployed postgreSQL image from dockerhub.

postgres openshift root user ibmcloud

It’s possible to enable images to run as root on OpenShift, that’s documented in the OpenShift documentation here, by adding a service account.

But, in this blog post we choose an alternative way, where we don’t change the security in OpenShift, here we will customize the postgreSQL Docker image a bit. We will follow the steps to create a postgreSQL database on OpenShift, along the creation of the database called postgreSQL database-articles for the Cloud Native Starter reactive example .

These are the major steps:

  1. Write the specifications and configurations  for:
    1. … the Dockerfile
    2. … the  yaml with a Kubernetes Deployment and a Kubernetes Service specification
  2. Execute the oc CLI commands to:
    1. … create a OpenShift project
    2. … create a OpenShift build configuration
    3. … start the build
    4. … apply the Deployment and Service specification
    5. … expose the Service

Continue reading

Setup a MongoDB in less than 4 min on a free IBM Cloud Kubernetes cluster at a Hackathon

In this blog post I want to highlight that I just created a GitHub project and a 10 min YouTube video to “How to setup mongoDB in less than 4 min on a free IBM Cloud Kubernetes cluster at a Hackathon”.

My objective is to provide a small guide, how to setup a MongoDB server and Mongo UI (Mongo-Express)  on a free IBM Cloud Kubernetes cluster and when you don’t want to use the existing MongoDB service on IBM Cloud.

On the free IBM Cloud Kubernetes cluster:  No persistent volume claims are used. So, keep in mind, if your Pod in Kubernetes crashes the data of the database is lost.

Based on the “security feature” of the MongoDB default port 27017, you need to run the application to access the MongoDB server in the Kubernetes cluster .

In other words, your UI application has to access the database with a server application, which also runs on the free Kubernetes cluster (like the Mongo UI (Mongo-Express)  in that example here). You should implement a backend for frontend architecture.

The YouTube video shows the setup and a description how it works.

Continue reading

Run a Docker image as a Cloud Foundry App on IBM Cloud

In that blog post I want to point out an awesome topic: “Run a Docker container image as a Cloud Foundry App on IBM Cloud”

Rainer Hochecker, Simon Moser and I had an interesting exchange about running a Docker image as a Cloud Foundry App on IBM Cloud.

The advantage with that approach is: you don’t need to instantiate a Kubernetes or OpenShift cluster. You can just run a single Docker image with your single application on IBM Cloud. That can be useful in different situations where you need to control the contents of your application, and the cloud foundry build-pack mechanism maybe restricts you.

IBM offers to run Cloud Foundry Apps on IBM Cloud and supports a set of build packsBut, by the fact IBM uses Cloud Foundry, you can also upload a Docker image as a Cloud Foundry application, it’s an officially supported feature. Yes there is no documentation related to that topic in the IBM Cloud documentation, but you can apply the Cloud Foundry documentation.

One impact of that situation is, you don’t see the VCAP variables and you can’t use the out of the box binding for IBM Cloud services. You have to manage the bindings to your IBM Cloud services by yourself.  

Let’s start with a short guide: How to setup a Cloud Foundry application using a Docker image.

Continue reading

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

Fast setup of a Java microservice project with MicroProfileStarter

In this blog post I want to show the easy setup of an own MicroProfile/OpenLiberty project with MicroProfileStarter . From my perspective that is  very useful for new Java developers, who want to build microservices. The prerequisite is, you have installed maven and Java on your local machine.

You can use for more information the MicroProfileStarter it self and the OpenLiberty getting started documentation.

That’s fits perfect to the topic Cloud-Native. Maybe you already know, we (Niklas, Harald and I) working on the open sourced Cloud Native Starter project. That project contains sample code that demonstrates, how to get started with Cloud-Native applications and microservices based architectures. Here we use also MicroProfile/OpenLiberty.

We created a new 60 -90 min hands-on workshop with the focus on Java microservice development with MicroProfile/OpenLiberty and the deployment to Kubernetes on IBM Cloud. This workshop is perfect to get a basic understanding of the Cloud-Native and Java development topics and the combination with MicroProfileStarter is awesome for newer Java Developers.

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