logzio / logzio-rsyslog

Shipping logs to logz.io
Apache License 2.0
14 stars 7 forks source link

sh: 0: unknown operand #7

Open mmuniraju4444 opened 6 years ago

mmuniraju4444 commented 6 years ago

i am facing some issue while running the install.sh script This is my docker file Dockerfile

FROM nginx:stable-alpine
RUN apk add --no-cache rsyslog curl
RUN curl -sLO https://github.com/logzio/logzio-shipper/raw/master/dist/logzio-rsyslog.tar.gz 
RUN tar xzf logzio-rsyslog.tar.gz && sh rsyslog/install.sh -t nginx -a "<TOKEN>"

On Build I am getting this error

sh: 0: unknown operand
install.sh: line 87: syntax error: bad substitution
install.sh: line 89: syntax error: unexpected "("

Can any one help me on this ?

ofer-velich commented 6 years ago

hey, in order to run it in alpine image please try to change the dockerfile to be like so:

FROM nginx:stable-alpine
RUN apk add --no-cache rsyslog curl bash sudo
RUN curl -sLO https://github.com/logzio/logzio-shipper/raw/master/dist/logzio-rsyslog.tar.gz
RUN tar xzf logzio-rsyslog.tar.gz && bash rsyslog/install.sh -t nginx -a "<TOKEN>" -q

Also make sure you have a nginx access log file in place, or else the script will fail