I faced at syslog related error when executing the program with the docker.
docker run -d -e SERVER_ADDR=127.0.0.1 --name go-agent1 go-agent:1.0
Docker logs: 2019/03/15 01:59:08 Unix syslog delivery error
DOCKERFILE
FROM centos:latest
RUN mkdir -p /cloud/config
WORKDIR /cloud
COPY go_agent go_agent (==>go_agent is go lang program)
COPY config/agent.conf config/agent.conf
COPY cloud-settings cloud-settings
CMD ["sh","-c","/cloud/cloud-settings ; /cloud/go_agent"]
#CMD ["/cloud/go_agent"] ==> Running go_agent alone will work.
When I run go_agent alone, it works fine. but after cloud-settings shell, go_agent cause syslog delivery error.
cloud-settings
#!/bin/bash
# chkconfig: 234 90 90
sed -i '3i\ "agent_server_ip":"'${SERVER_ADDR}'",' config/agent.conf
I want to know how to fix syslog error.