I'm trying to build a simple in-browser shell using Docker and xterm.js. I've correctly hooked up the frontend using xterm.js's attach addon.
How does one connect to Docker via websockets?
If you are using a Docker API >= 1.28, you cannot connect straight to it with xterm.js, since Docker changed their WebSocket protocol from text to binary 😞.
There is an open xterm.js issue for that: https://github.com/xtermjs/xterm.js/issues/883.
Related
I have my Tyk components (Tyk Pro Demo from GitHub) running using Docker compose. When I create a simple API using some public APIs, like Pet Store Io, it works fine.
Now I have word press application running using Docker compose, and the Docker compose file is available here (https://docs.docker.com/samples/wordpress/). This application is running on http://localhost:8000.
However, when I pass this 'localhost:8000' to the target URL in Tyk API definition, and call it through Tyk, it show 'There was a problem proxying the request'.
Is there any setting/ method which can solve this problem?
Actually when I referred to Docker documentation, I realized that I just need to put them in the same Docker network and it will be done.
I have a working webpage.
It is hosted on an rpi.
Backend is using flask and SQLite.
Python is using a venv and the server is nginx.
These are connected with uWSGI.
Source code is in github.
I have heard that a docker can add an extra layer of security.
Is it possible to add this project to a docker container (without breaking functionality) after the page is up and running?
What changes must be done if possible?
Yes, it's perfectly possible. But even though you should be able to host it in your RPI, I don't think it's worth the effort.
What you will need:
Install docker in RPI device
Write a Dockerfile containing the instructions to setup and run the application
Build the image from your Dockerfile
Run the image in your RPI's docker
I have an app that creates docker containers using the docker remote api, which is done using this library.
So far it is working fine with simple configuration options for the container creation. Now I need to create the container with much more config options, so wondering if i can use a docker-compose file. This api is created based on v1.23 of docker remote api spec, does docker remote api support creating a container using a compose file?
I cannot find an option from this documentation. but wondering if i am looking in wrong place.
No; Docker Compose itself is an application that uses the API. You’d need to directly run docker-compose up or something similar as a shell command if you wanted to directly use it.
(You might be able to hack into its internals if you have a Python program, but not from Java.)
I have a number of Docker containers (10) each running a Java service that makes up my system. To create these containers I use a couple of docker-compose files. Using the Docker Integration plugin for IntelliJ, I can now spool up these services to my remote server using the Docker-compose option (the images used are built outside of IntelliJ, using Gradle). Here are the steps I have done to achieve this:
I have added a Docker server using the Docker Machine option to connect to the remote Docker daemon (message says Connection Successful).
I have added a new Docker Compose configuration, using the server, specifying my compose files, and the services I want to start.
Now that I have the system controlled through IntelliJ, I have been trying to figure out how to attach the remote debugger to each of these services so that IntelliJ will hit my breakpoints.
Will I need to add the JVM args (-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005) to each service (container) and add the usual remote debug configuration for each service? Do I need to use a different address for each service? If so, how do I add these args? Surely with the Docker Integration plugin, there is an easier way to do this.
IntelliJ Idea v2018.1.5 (Community Edition)
Docker Integration v181.5087.20
Is there a way to add API endpoints in Kong without using curl? I have Kong up and running in a docker container using docker-compose and I would like to be able to pass in a configuration file (or what-have-you) on container spin up that outlines the endpoints I would like setup. Is this possible? This is the closest I have found to a solution : http://blog.toast38coza.me/kong-up-and-running-part-2-defining-our-api-gateway-with-ansible/
One option could be to use the YAML driven Kongfig tool to manage the config of the machine. You could run it external to the container e.g. via a CI process (Jenkins etc.) or in theory add a bootstrap action with Konfig running locally within the container.
You can use Kongfig as Mark said or throught the GUI Konga