Browse Source

:pencil: merge docker usage

Jeremy Zheng 4 years ago
parent
commit
7c723fe3d4
6 changed files with 58 additions and 0 deletions
  1. 1 0
      docker/.gitignore
  2. 53 0
      docker/README.md
  3. BIN
      docker/documents/start.png
  4. BIN
      docker/documents/workspace.png
  5. 2 0
      docker/first.sh
  6. 2 0
      docker/next.sh

+ 1 - 0
docker/.gitignore

@@ -0,0 +1 @@
+*.tar

+ 53 - 0
docker/README.md

@@ -0,0 +1,53 @@
+# Usage for Ubuntu 20.10 and newer
+
+- Install podman: `sudo apt -y install podman runc buildah skopeo`.
+- Setup `/etc/containers/registries.conf`.
+
+  ```text
+  [registries.search]
+  registries = ['quay.io', 'docker.io']
+  ```
+
+- Work with podman image
+
+  ```bash
+  # clear outdated images
+  podman rmi -a -f
+  # uncompress image files
+  cat palm.tar.xz.a* | tar xj
+  # import new podman image
+  podman load -q -i mint-TIMESTAMP.tar  
+  ```
+
+- Enjoy it!
+
+  ![workspace](documents/workspace.png)
+  ![start](documents/start.png)
+
+  ```bash
+  # for the first time start
+  ./docker/first.sh
+  # fot the next time start
+  ./docker/next.sh
+  
+  # start servers
+  > sudo supervisord -c /etc/supervisor/supervisord.conf
+
+  # enable rabbitmq Management Plugin 
+  > sudo rabbitmq-plugins enable rabbitmq_management
+
+  # enable redis clusters
+  > /etc/redis/redis.sh
+  ```
+
+  - RabbitMQ: `http://localhost:15672`, user `guest`, password `guest`
+  - Redis cluster ports `6371~6376`
+  - Minio server: `http://localhost:9001` user `admin`, password `12345678`
+  - PostgreSql: `psql -U postgres -h 127.0.0.1 -p 5432`
+  - ElasticSearch: `curl http://127.0.0.1:9200/`
+
+- For VSCode **Run in your local host**
+
+```bash
+sudo apt install yarnpkg golang-go
+```

BIN
docker/documents/start.png


BIN
docker/documents/workspace.png


+ 2 - 0
docker/first.sh

@@ -0,0 +1,2 @@
+#!/bin/sh
+podman run --name mint -it --userns=keep-id --hostname=palm --user=$(id -ur):$(id -gr) --network host --events-backend=file -v $PWD/..:/workspace:z palm

+ 2 - 0
docker/next.sh

@@ -0,0 +1,2 @@
+#!/bin/sh
+podman start -i -a --events-backend=file mint