amc, aerospike are not recognized inside docker container amc, aerospike are not recognized inside docker container docker docker

amc, aerospike are not recognized inside docker container


Aerospike's official docker container does not have Aerospike Server running as a daemon, but instead as a foreground process. You can see this in the official github DOCKERFILE.

AMC is not part of Aerospike's Docker Image. It is up to you to run AMC from the environment of your choosing.

Finally, since you have not created a custom aerospike.conf file, Aerospike Server will only respond to clients on the Docker internal network. The -p parameters are not sufficient in itself to expose Aerospike's ports to clients, you'd also need to configure access-address, if you'd want client access from outside of the docker environment. Read more about Aerospike's networking at: https://www.aerospike.com/docs/operations/configure/network/general


You can build your own Docker container for amc to connect to aerospike running on containers.

Here is a sample Dockerfile for AMC.

cat Dockerfile FROM ubuntu:xenialENV AMC_VERSION 4.0.13 # Install AMC server RUN \  apt-get update -y \  && apt-get install -y wget python python-argparse python-bcrypt python-openssl logrotate net-tools iproute2 iputils-ping \  && wget "https://www.aerospike.com/artifacts/aerospike-amc-community/${AMC_VERSION}/aerospike-amc-community-${AMC_VERSION}_amd64.deb" -O aerospike-amc.deb \  && dpkg -i aerospike-amc.deb \  && apt-get purge -y# Expose Aerospike ports##   8081 – amc port#EXPOSE 8081 # Execute the run script in foreground modeENTRYPOINT ["/opt/amc/amc"]CMD [" -config-file=/etc/amc/amc.conf -config-dir=/etc/amc"]#/opt/amc/amc -config-file=/etc/amc/amc.conf -config-dir=/etc/amc# Docker build sample:# docker build -t amctest .# Docker run sample for running amc on port 8081# docker run -tid --name amc -p 8081:8081 amctest# and access through http://127.0.0.1:8081

Then you can build the image:

docker build -t amctest .Sending build context to Docker daemon  50.69kBStep 1/6 : FROM ubuntu:xenial ---> 2fa927b5cdd3Step 2/6 : ENV AMC_VERSION 4.0.13 ---> Using cache ---> edd6bddfe7adStep 3/6 : RUN apt-get update -y   && apt-get install -y wget python python-argparse python-bcrypt python-openssl logrotate net-tools iproute2 iputils-ping   && wget "https://www.aerospike.com/artifacts/aerospike-amc-community/${AMC_VERSION}/aerospike-amc-community-${AMC_VERSION}_amd64.deb" -O aerospike-amc.deb   && dpkg -i aerospike-amc.deb   && apt-get purge -y ---> Using cache ---> f916199044d8Step 4/6 : EXPOSE 8081 ---> Using cache ---> 06f7888c1721Step 5/6 : ENTRYPOINT /opt/amc/amc ---> Using cache ---> bc39346cd94fStep 6/6 : CMD  -config-file=/etc/amc/amc.conf -config-dir=/etc/amc ---> Using cache ---> 8ae4300e7c7cSuccessfully built 8ae4300e7c7cSuccessfully tagged amctest:latest

and finally run it with port forwarding to port 8081:

docker run -tid --name amc -p 8081:8081 amctesta07cdd8bf8cec6ba41ce068c01544920136a6905e7a05e9a2c315605f62edfce