I can't run minio as a brew service - homebrew

I trying to run minio as a daemon using brew services:
brew services start minio
And I get the following error
Error: Formula `minio` has not implemented #plist, #service or installed a locatable service file
I installed minio using brew install minio/stable/minio as specified in the documentation for MacOS, and running minio as a one of command works
minio server ./data

Related

How do I use stripe cli as a docker service?

Thanks in advance for all your support guys!!!!
So, I have a dockerized django application in which I want to maintain the stripe-cli webhook command:
stripe listen --foward-to http://host-name:8000/webhook/...
by having it(stripe-cli) as a docker service and what I have done to try to make it work is as shown below:
services:
stripe-cli:
image: stripe/stripe-cli
container_name: stripe-cli
command: "listen --api-key=my_stripe_login_key --forward-to http://localhost:8000/stripe/webhook"
But when I try to build the docker compose file, I am getting an error;
stripe-cli | exec /bin/stripe: exec format error
stripe-cli exited with code 1
I will appreciate for any of your feedback!
Other Information:
I have an ubuntu docker base image
I am using an arc-based linux distribution XeroLinux on my host machine
This is a known issue with the Stripe CLI and the latest version of the Docker container. If you specify the container version as v1.12.4 you should be able to run your docker service following the guidance for the CLI here.
I would watch the issue to get updated when the issue gets resolved. Also you can bump the issue by commenting on it.

Map Docker compose volume with cloudwatch logs

Docker compose services uses the volume with /test/app. The logs will be stored on /test/app. Then I used to view the logs through AWS cloudwatch console. But i am facing the below error while starting the services using docker-compose.
version: '3.9'
services:
test-media:
image: test-media:test
container_name: test
restart: "no"
volumes:
- /test/app:/app/test-media/logs
ports:
- 3000:3000
networks:
- test-network
networks:
test-network:
"Cannot start service test-media: error while creating mount source path '/test/app': mkdir /test: read-only file system"
suggest me on how to map the docker volume path /test/app to cloudwatch logs group.
Followed the below steps for cloudwatch configurations.
To install and configure CloudWatch Logs on an existing Ubuntu Server
curl https://s3.amazonaws.com/aws-cloudwatch/downloads/latest/awslogs-agent-setup.py -O
sudo python ./awslogs-agent-setup.py --region ap-south-1
Step 1 of 5: Installing pip ...libyaml-dev does not exist in system python-dev does not exist in system DONE
Step 1 of 5: Installing pip ...libyaml-dev does not exist in system python-dev does not exist in system DONE
Step 2 of 5: Downloading the latest CloudWatch Logs agent bits ... DONE
Step 3 of 5: Configuring AWS CLI ...
AWS Access Key ID [****************UY56]:
AWS Secret Access Key [****************67BR]:
Default region name [ap-south-1]:
Default output format [json]:
Step 4 of 5: Configuring the CloudWatch Logs Agent ...
Path of log file to upload [/var/log/syslog]: /test/app/test-media.log
Destination Log Group name [/test/app/test-media.log]: /test/app/test-media.log

exec: "com.docker.cli": executable file not found in $PATH

I am getting this error when docker-compose up on one of the containers only.
exec: "com.docker.cli": executable file not found in $PATH
The terminal process "/bin/zsh '-c', 'docker logs -f f6557b5dd19d9b2bc5a63a840464bc2b879d375fe72bc037d82a5358d4913119'" failed to launch (exit code: 1).
I uninstalled and reinstalled docker desktop#2.3.0.5 on Mac
docker-compose build from scratch
other containers are running
I get the above error.
It used to be running. I am not sure why this is happening. I know that I upgraded docker from I think 2.3
also I think I received an update on my mac
Dockerfile
FROM tiangolo/uvicorn-gunicorn:python3.8
COPY requirements.txt /app/
RUN pip install -r requirements.txt
COPY ./app /app/app
#COPY config.py /app/app/
docker-compose.yml
version: "3"
services:
postgresql:
container_name: postgresql
image: postgres:12
ports:
- "5433:5432"
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
volumes:
- ./postgres-data:/var/lib/postgresql/data
fastapi:
build:
context: ./fastapi/
dockerfile: Dockerfile
volumes:
- ./fastapi/app/imgs:/app/app/imgs
ports:
- "1001:80"
depends_on:
- postgresql
env_file:
- .env
pgadmin:
container_name: pgadmin
image: dpage/pgadmin4
environment:
- PGADMIN_DEFAULT_EMAIL=pgadmin4#pgadmin.org
- PGADMIN_DEFAULT_PASSWORD=admin
ports:
- "5050:80"
depends_on:
- postgresql
solr:
build:
context: ./solr/
dockerfile: Dockerfile
restart: always
ports:
- "8983:8983"
volumes:
- data:/var/solr
volumes:
data:
update:
It worked when I downgraded to docker desktop 2.3.0.4
Updated Answer:
Since VSCode Docker 1.14.0 you can now set the Docker executable path in the settings, which should help in most cases.
Old Answer (Option was removed from Docker Desktop):
The Desktop Docker Version 2.4.0.0 is working for me after I did deactivate the feature Enable cloud experience. You can find it under Preferences --> Command Line.
If you are still experience the problem, you may try a clean remove and install of Docker and also make sure that Docker is actually running, see other possible solution(s) here.
History of GitHub Issues:
https://github.com/docker/for-mac/issues/4956
https://github.com/microsoft/vscode-docker/issues/2366
https://github.com/microsoft/vscode-docker/issues/2578
https://github.com/microsoft/vscode-docker/issues/2894
Status (2021-06-22): VSCode Version 1.57.0 seems to have fixed the issue again.
You might get the following error message simply because you did not start Docker just yet
exec: "com.docker.cli": executable file not found in $PATH
In my case the problem was I had installed and then crudely removed the docker compose cli. This resulted in the above error to start popping up.
I got the compose CLI back using instructions from https://docs.docker.com/cloud/ecs-integration/#install-the-docker-compose-cli-on-linux and running (as root):
curl -L https://raw.githubusercontent.com/docker/compose-cli/main/scripts/install/install_linux.sh | sh
This fixed it for me.
Note: I would not recommend installing docker-compose cli to fix this issue, but to share some insights in case this is applicable to you as well.
Ensure that docker CLI is installed not just docker desktop on Linux. YOu can install it using:
sudo apt install docker.io
Update: The "cloud experience" no longer exists even as an experimental feature in Docker Desktop v3.2.1. This should no longer be an issue.
If you continue to see this problem on a newer version, you will need to downgrade to Docker v3.1.0, disable the cloud experience feature, then upgrade to the newest version.
Had the exact same issue. Was fixed after starting the upgraded docker first, then running this command.
dostarr#DOSTARR-M-38LF ~ % docker run busybox
exec: "com.docker.cli": executable file not found in $PATH
<started docker>
dostarr#DOSTARR-M-38LF ~ % docker run busybox
dostarr#DOSTARR-M-38LF ~ %
I had the same problem when trying to run minikube tunnel, and since I didn't want to re-install anything, I ended up running it from the docker bin path (on Windows it's in 'C:\Program Files\Docker\Docker\resources\bin') and it worked.
An alternative to Docker Desktop is colima, container runtimes on macOS (and Linux) with minimal setup.
# Homebrew
brew install colima docker
colima start
Now, you can use the docker commands as before.
For docker compose commands, you have to install:
brew install docker-compose
if already have installed docker, it may not have started. So type in terminal,"docker run -d -p 80:80 docker/getting-started" and it should solve the issue.

Install a wheel package inside a docker container

I am creating an airflow docker container using the docker image "puckel/docker-airflow".
I have created a docker-compose file that uses this image and links 2 volumes, one for dags and other for the wheel package.
When I start the container and go to airflow UI it throws "No module named 'custPkg'" error. So I exec into the container using the command
docker exec -ti <container_id> bash
and then installed it using pip. I can use the package if I run a python shell using the command
from custPkg.abc import Base
but it's still not working on the airflow.
The airflow webserver which even refreshes after some time is still showing the same error on the terminal on which I started the conatainer using
docker-compose up
my docker-compose file looks like this
version: "3"
services:
webserver:
image: puckel/docker-airflow:latest
container_name: test_container
volumes:
- /home/ubuntu/dags1/:/usr/local/airflow/dags
- /home/ubuntu/dist/:/usr/local/airflow/dist
ports:
- 8080:8080
restart: always
--------------------NEW UPDATE----------------------------
I just restarted the container and it is working now, but I don't want to go into the container and run the exec command manually. Can I somehow do this using the docker-compose file only?

Adding Plugin to Kibana Image in docker-compose.yml

I am new to using docker and trying to add the elastalert plugin to my kibana image. I am using Kibana 7.0.1 and Elasticsearch 7.0.1 and trying to use the elastalert 7.0.1 kibana plugin from github. When I run docker-compose up using the below docker-compose.yml file it does seem to install the plugin, but it doesn't actually start up kibana. Am I missing another command? Thanks
services:
...
kibana:
image: docker.elastic.co/kibana/kibana:7.0.1
...
command: ./bin/kibana-plugin install https://github.com/bitsensor/elastalert-kibana-plugin/releases/download/1.0.4/elastalert-kibana-plugin-1.0.4-7.0.1.zip
So when you override command section you must remember to keep existing behavior which is set by image author.
So in you case you can actually install kibana plugin this way but you must also add Kibana start at the end of the command by using e.g. && to run process after plugin installation. So in your case it should be:
command: sh -c './bin/kibana-plugin install https://github.com/bitsensor/elastalert-kibana-plugin/releases/download/1.0.4/elastalert-kibana-plugin-1.0.4-7.0.1.zip && exec /usr/local/bin/kibana-docker'

Resources