VS Code Remote Development using a docker container hosted in the cloud - docker

With the VS Code extension Visual Studio Code Remote - Containers I can develop inside a container that is spun up on my local computer via Docker Desktop.
Is there any way to develop inside a container hosted on Azure, AWS, Google Cloud, or any other cloud system instead?
I can't use Docker Desktop locally because I'm on a Macbook Pro with Apple Silicon, meaning that Docker does not work the same way as it would on an Intel chip.
UPDATE 2021-12-04:
I solved the issue by using GitHub Codespaces

You can use docker context
It forwards the remote docker socket via ssh to your local machine
docker context create NAME_OF_THE_CONTEXT --docker "host=ssh://$SERVER_USER_NAME#$SERVER_IP"
Use the context
docker context use NAME_OF_THE_CONTEXT
Now you can run docker commands in your local terminal that will be executed on the remote host.
So now you can connect to remote containers via VSCode as if the containers are running remotely.

Related

Skaffold dev with remote docker context

I am working on a web application with all the infrastructure based on Kubernetes. In my local environment, I am using Skaffold.
I have two computers (Desktop and Laptop) with 8Gb of RAM each. By starting minikube (virtualbox driver) and skaffold dev the Deskop is freezing.
So I decided to use the Laptop for coding and the Desktop for running minikube and everything related.
I successfully managed to set up kubeconfig on the laptop to have a context with the minikube server.
Actually, The issue is skaffold.
When I run skaffold dev, it fails because minikube of the Deskop doesn't see the images build by skaffold on my laptop. kubectl get po returns ImagePullBackOff.
That is because skaffold uses the local docker to build the image.
The question is how to make skaffold use the docker install in my Desktop?
I changed the docker context of my laptop so that it's linked to the Desktop context but it's still not working, skaffold is still using the default docker context installed in my laptop.
How to make the images build by Skaffold being available on my Desktop?
Is it possible for Skaffold to use a remote docker context? If yes, how?
Minikube uses its own Docker installation to power its cluster. This daemon runs in Minikube's VM (or container, if using the docker driver) and is completely independent from the host's Docker daemon (your Desktop). You can access to Minikube's daemon by setting the environment returned by minikube docker-env.

Remote Docker engine in PhpStorm Services

I can't find any information if I can use PhpStorm Services with Docker Engine installed on the remote server.
I know I can use docker context command to switch between local and remote Docker Engine, and it works fine for me but I want to integrate PhpStorm too to improve my work.
Is it even possible to connect PhpStorm to the remote Docker in this way?

VSCode in-container-debugging over SSH machine

I am trying to setup and advanced configuration with VScode insider and I ma facing an issue.
My setup is:
VSCode Running in my local machine Windows 10 with a Django source code hosted on my machine. I have no docker client on this machine, and I don't wont to install one...
A virtual machine with Ubuntu is running a docker daemon, docker client and docker-compose. My workspace is shared over vboxfs and mounted on my Ubuntu
A python docker container is running in the Ubuntu machine and running the mounted code.
I tried to use the Remote Extension to debug the python code inside the container. However, when a run my vscode inside on the remote SSH Taget (so the ubuntu machine), I am able to manage docker objects (images, containers, etc...) using the Docker extension of vscode, but I can't see the option: Remote-Containers: Open Folder in Container. It's not found in the F1 command... I can see the other related command like: Remote-Containers: Settings.
Do you have any idea ? Or my setup is not supported by the extension ? It seems like it supports SSH development or Container development but not mixing both together, right ?
Is there any other VSCode config to debug in my targeted setup ?
Regards

How to build docker images on AWS EC2 Windows Server instance?

We use Team City to build C# applications on a Windows server in AWS EC2.
Now there is a requirement to build Docker containers using the same system. The build steps have been tested locally and are able to produce a docker image.
Docker is not installing correctly on the server which leads to the builds failing.
Docker Edge supports Windows Server but fails on EC2 due to Hyper-V not functioning correctly.
Docker Toolbox also fails because VT-X/AMD-v are not enabled.
Is there any way to build docker images on an AWS EC2 Windows Server instance?

Using commands in bluemix user interface

I need to use docker container in bluemix but my laptop does not support docker so I can't use the commands to run docker in bluemix using the CLI plug-ins.
Is there any other way to do this?
Why can't you run it on your laptop? Docker can run in some flavor on most operating systems (albeit within a VM on some).
You have a number of options though:
Run it inside a linux virtual machine locally
Run it inside a cloud linux virtual machine
Run it inside a cloud container - Yes, you can actually run Docker inside a Docker container.
Install a linux OS as a dual boot option on your laptop and run Docker there.
Edit: formatting
which OS does your notebook run?
Docker supports Linux, OSX and Windows as well, and you could choose to use cf container plugin (cf ic), docker or also ice client.
Here you could find Bluemix documentation related to container

Resources