1

I have created a Linux Centos container through the following Dockerfile:

FROM centos

RUN cd /etc/yum.repos.d/

RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*

RUN sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*

RUN yum update -y

RUN yum makecache --refresh

RUN yum -y install gdb

Inside that Linux container, I am running a script that first initializes a Couchbase docker image, at http://localhost:8091. After initializing the Couchbase docker image, I try to make an http.request to the Couchbase server that should be up and running, through

http.request({
            host: host,
            port: 8091,
            path: '/'
          }

but that doesn’t seem to work. Do you have any ideas as to why it might be happening? Could it be the fact that I haven’t exposed port 8091 in my Linux container? Or could it be that I am not setting up the Couchbase server right? The issue is that I am trying to run a container, inside of another container and then from the outer container(Linux) make a call to the interior one (Couchbase).

Thank you in advance.

shaped
  • 11
  • 1
  • That Dockerfile doesn't seem to install any software beyond `gdb`. Is that the entire Dockerfile? Are there more `RUN yum install` commands and a default `CMD` for the image that you haven't shown? – David Maze Apr 06 '22 at 23:43
  • There is no `CMD` in my Dockerfile. On top of`RUN yum install`, I also ran the following after I was inside my container: First, I run the image using: `Docker run -it --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -v /var/run/docker.sock:/var/run/docker.sock linux /bin/bash` and then I ran: `yum install java` `yum install docker` `yum install nodejs` `curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash` `source ~/.bashrc` `yum install -y python3` `yum install make` `yum groupinstall 'Development Tools'` – shaped Apr 07 '22 at 00:30
  • What machine are you making that `http.request` from? Are you mapping the required Couchbase ports as described in the [Couchbase image description on Docker Hub](https://hub.docker.com/_/couchbase)? – dnault Apr 07 '22 at 17:41
  • I am making the http.request from the Linux container.I tried exposing ports -p 8091-8094:8091-8094 but not the 11210:11210 one – shaped Apr 07 '22 at 19:45

0 Answers0