How to install Memgraph on Mac that has M1 processor? - docker

I'm confused about what I should do to install Memgraph on Mac that has M1 processor. Do I need to run the command docker run -it -p 7687:7687 -p 3000:3000 memgraph/memgraph-platform or should I go to https://memgraph.com/download and download Docker image from that page?

Installing Memgraph on Linux, MacOS and Windows can be achieved by using Docker. There is a bit of difference if we talk about MemgraphDB and Memgraph platform.
If we talk about MemgraphDB there is no difference between downloading Memgraph from download website or pulling from Docker hub.
If you want to pull an image and build a container from the Docker hub, it is enough to run the docker command:
docker run -p 7687:7687 -p 7444:7444 -v mg_lib:/var/lib/memgraph memgraph/memgraph
This command will pull a MemgraphDB and run the container.
If you use our download page, then you need to load an image first with the following command:
docker load -i /path-to/memgraph-<version>-docker.tar.gz
After loading an image, you can build and run a container via the following command:
docker run -p 7687:7687 -p 7444:7444 -v mg_lib:/var/lib/memgraph memgraph/memgraph
If you want to install Memgraph platform (MemgraphDB, Lab, mgconsole, Mage), then only option is Docker hub, and running the following command:
docker run -it -p 7687:7687 -p 7444:7444 -p 3000:3000 -v mg_lib:/var/lib/memgraph memgraph/memgraph-platform
Previous command will pull the latest image, build the container and run it.
You can find a lot more information on MacOS installation docs
In addition, there are Linux native packages for Ubuntu, Debian and Centos 7,8.

Related

Can't acces apache on docker from my network

I have this Dockerfile :
FROM ubuntu:20.04
EXPOSE 80
After installing apache2 package in the container I can't acces the default page of apache from the network. Also docker is in a virtual machine with debian 10. If I try the official apache image (https://hub.docker.com/_/httpd) everything works fine but I want to know why installing it manually doesn't work.
To build the container from the image I use this command :
sudo docker run --name ubuntu -p 80:80 -it ubuntu /bin/bash
I have run the exactly same test on my virtual centos machine and found working.
I've build the image using your dockerfile and run apache installation using below command.
docker build -t ubuntu
docker run --name ubuntu -p 80:80 -it ubuntu /bin/bash
and In terminal opened by the above mentioned command, i ran the below command.
apt-get update
apt-get install apache2
service apache2 start
After that opened another ssh terminal keeping the current running as i have not run the Ubuntu container in detached mode and checked by using.
docker ps -a
and found container is running with exposing 0.0.0.0:80 and checked
curl localhost
Please make sure you have not stoped docker container before running curl command or hit in the browser as its not run in detached mode or background.

why do i keep seeing nginx index.html on localhost when i run my docker image

I installed and run nginx on my linux machine to understand the configurations etc. After a while i decided to remove it safely by following this thread in order to use it in docker
By following this documentaion i run this command
sudo docker run --name ngix -d -p 8080:80 pillalexakis/myrestapi:01
And i saw ngix's homepage at localhost
Then i deleted all ngix images & stopped all containers and i also run this command
sudo docker system prune -a
But now restarted my service by this command
sudo docker run -p 192.168.2.9:7777:8085 phillalexakis/myfirstapi:01 and i keep seeing at localhost ngix index.html
How can i totally remove it ?
Note: I'm new with docker and i might have missed a lot of things. Let me know what extra docker commands should i run in order provide better information.
Assuming your host have been preparing as below
your files (index.html, js, etc) under folder - /myhost/nginx/html
your nginx configuration - /myhost/nginx/nginx.conf
Solution
map your files (call volume) on the fly from outside docker image via docker cli
This is the command
docker run -it --rm -d -p 8080:80 --name web \
-v /myhost/nginx/html:/usr/share/nginx/html \
-v /myhost/nginx/nginx.conf:/etc/nginx/nginx.conf \
nginx
copy your files into docker image by build your own docker image via Dockerfile
This is your Dockerfile under /myhost/nginx
FROM nginx:latest
COPY ./html/index.html /usr/share/nginx/html/index.html
This is the command to build your docker image
cd /myhost/nginx
docker build -t pillalexakis/nginx .
This is the command to run your docker image
docker run -it --rm -d -p 8080:80 --name web \
pillalexakis/nginx

prometheus run using docker

This is the first time I am using docker to run a release file.
I installed docker using
npm install -g docker
I am trying to use Prometheus.
https://github.com/prometheus/prometheus
I followed following steps
Download Prometheus [https://hub.docker.com/r/prom/prometheus/]
docker pull prom/prometheus
C:\xampp\htdocs\prometheus>docker pull prom/prometheus
Saved file tree to doc-filelist.js
Copied JS to doc-script.js
Compiled CSS to doc-style.css
Run docker [https://github.com/prometheus/prometheus]
docker run --name prometheus -d -p 127.0.0.1:9090:9090 prom/prometheus
C:\xampp\htdocs\prometheus>docker run --name prometheus -d -p 127.0.0.1:9090:9090 prom/prometheus
Saved file tree to doc-filelist.js
Copied JS to doc-script.js
Compiled CSS to doc-style.css
I am not sure what is wrong. Please advice
I think what you are installing is this docker which is a documentation generator rather than this docker , which is a container technology.
So , refer to this to install the correct Docker first .Then execute the following commands:
# docker pull prom/prometheus
# docker run --name prometheus -d -p 127.0.0.1:9090:9090 prom/prometheus
Then open the browser and visit http://127.0.0.1:9090 and you should see the Prometheus UI.
If you are using docker to run Prometheus, make sure
Docker engine is installed.
Keep a configuration file (promethues.yml) file.
run the container using the command.
docker run -d -p 9090:9090 -v /path_where_config_file_present/:/etc/prometheus -v /path_where_data_file_to_be_dumped/:/prometheus prom/prometheus:v2.4.0 --config.file=/etc/prometheus/prometheus.yml

Docker couchbase cbbackup/cbtransfer/cbrestore tools

I've used docker to install couchbase on my ubuntu machine using (https://hub.docker.com/r/couchbase/server/). The docker run query is as follows:
docker run -d --name db -p 8091-8094:8091-8094 -p 11210:11210 -v /home/dockercontent/couchbase:/opt/couchbase/var couchbase
Everything works perfectly fine. My application connects, I'm able to insert/update and query the couchbase. Now, I'm looking to debug a situation wherein the couchbase is on my co-developers machine who also has the same installation i.e., couchbase on docker using the above link. For achieving this, I wanted to run cbbackup on his installation. To achieve this, I run the following command which is a variation of the above link:
bash -c "clear && docker exec -it couch-db sh"
Can anyone please help me with the location of /opt/couchbase/bin in this setup? I believe this is where I can get access to "cbbackup", "cbrestore" and "cbtransfer" which I can then use to backup and restore data from my colleague's machine.
Thanks,
Abhi.
When you run the command
docker run -d --name db -p 8091-8094:8091-8094 -p 11210:11210 -v /home/dockercontent/couchbase:/opt/couchbase/var couchbase
you're pulling a docker image and spawning a docker container.
Please read more about Docker and containerization.
In order to run cbbackup you need to log into your docker container.
Follow these steps:
Retrieve the container-id:
$ docker ps -a
Look for the CONTAINER ID for IMAGE NAME=couchbase
Login to the container using the command:
$ docker exec -it <container-id> bash
Go to the directory : /opt/couchbase/bin using:
$ cd /opt/couchbase/bin
You'll find cbbackup binary in this directory.

Can't run Raspbian container on docker

So I've installed the hypriot OS for docker and I have tested it with ocker run -d -p 80:80 hypriot/rpi-busybox-httpd. All is well and the test works.
However, when I run docker run -i -t resin/rpi-raspbian to get raspbian nothing happens and docker ps shows no containers running. There are no error messages.
What is happening to my raspbian container?
Thanks
Running on Mac OSX and having downloaded the resin/rpi-raspbian image, I issue the command:
docker run -i -t resin/rpi-raspbian /bin/bash
which starts the container and puts me at the command prompt in raspbian.

Resources