Tag: linux

gsub encoding error when running on Linux Docker Container Invalid byte sequence in US-ASCII

I have a string I’m converting from “\r\n” to “\n” line ends using: input.gsub(/\r\n?/, “\n”) When I run it on my Windows host, it works fine. When I run on my Linux host, in a docker container, I get this error: in `gsub’: invalid byte sequence in US-ASCII (ArgumentError) I am running Ruby 2.2.

Not getting the IP address of the docker container from node.js code when run the container with port forwarding

I write a basic node.js code to get the IP of the Host. code looks like this: var express = require(‘express’); var os = require(‘os’); var app = express(); var interfaces = os.networkInterfaces(); app.get(‘/’,function(req,res){ var addresses = []; for (var k in interfaces) { for (var k2 in interfaces[k]) { var address = interfaces[k][k2]; if […]

Visual C++ for Linux Development + Docker

I would like to develop a Linux C++ app by building and debugging in a Docker container. I intend to use Visual C++ for Linux Development to remote debug into the container. However this Visual Studio extension was originally intended for use with a Linux VM, Linux development and Docker are new to me, and […]

Can Docker automatically add IP addresses to the host upon running container

I’ve got a server on hetzner.de with around 16 public IPv4 addresses. Right now I’m running containers like this: sudo docker run -d –name test6 -it -p 5.1.2.3:80:80 sunebeck/apache-php This will initially yield this error: Error starting userland proxy: listen tcp 5.1.2.3:80: bind: cannot assign requested address. Which is fixed by adding the ip address […]

Running windows containers and linux with the same docker client [closed]

Is there a way to run both windows docker container engine and Linux docker container engine on Windows And use the same cli for commands to both? So I can spin up linux and windows containers with the appriopriate engine? For example run docker pull microsoft/windowsnano and docker pull ubuntu?

How to access a host port (bind with ssh -R) from a container?

Using Docker 1.12.1, I face a strange behaviour trying to access a host port created with ssh -R. Basically I try to access a service running on port 12345 on my local machine from a docker container running on a server. I opened a ssh connection with ssh -R *:12345:localhost:12345 user@server to open a port […]

Docker port not visible

I pulled fedora image to my docker server and ran it. But unfortunately ports are not visible for the image. pls assist me (attached image) thanks Docker screenshot

Start Docker Daemon as other user

Guys, I need to start docker daemon as other user under my Ubuntu 14.04.. I have this user in the sudoers’ group and in the docker’s group, but, what I need is the docker daemon running as my “test” user. test@test:/usr/bin$ start docker start: Rejected send message, 1 matched rules; type=”method_call”, sender=”:1.88″ (uid=1100 pid=24071 comm=”start […]

Using rc.local to start network dependent services

Is it safe to use /etc/rc.local to initialize services that depend on the network? I’m using it to start a service that makes some requests to the network during its startup process. Happens that occasionally the service startup is failing (not all the times). This is the error I’m getting: 2016-06-07T12:01:48.724+0000 W NETWORK [ReplicationExecutor] getaddrinfo(“my_machine_local_dns”) […]

Can docker run additional libraries my OS doesnt support?

I have an OS(Amazon Linux) that doesn’t support a library (libcgj). If I host the application via docker container, can I use this library?

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.