Docker Community Forums

Share and learn in the Docker community.

Docker Ruby crontab error

I made docker:
FROM ruby:2.7

RUN mkdir /usr/src/app
WORKDIR /usr/src/app

COPY Gemfile Gemfile.lock ./
RUN gem install bundler
RUN bundle install

COPY ./ ./
RUN chmod +x

CMD ["./"]

echo 'date.local upload script started at: ’ ( date '+%F %H:%M:%S' ) ruby /usr/local/bundle/gems/ckan_cli-1.0.2/exe/cli.rb upload -d http://date.local/register.csv -c conf.json -r res.json -w echo 'date.local upload script ended at: ' ( date ‘+%F %H:%M:%S’ )
exit 0;

If I start ./ to do manually in docher bash or from dockerd docker exec -it date.local ./ script work well. But I need to made crontab job, and one time in day execute this script. I install cron. I made crontab job:
20 22 * * * /usr/src/app/ >> /var/log/date.local/date +\%Y\%m\%d-date.local.log 2>&1

But I get the error:
/usr/src/app/ 4: /usr/src/app/ ruby: not found

I finded more advice internet, But they not work :frowning:
How resolve it?