Migrations not running in Docker

I am having an issue where my migrations are not running in docker. No error, no output, nothing.

When I run rake db:migrate:status I get this error:

Schema migrations table does not exist yet.

``

But when I run it on the host machine (OSX) migrations run just fine.

Here’s my Dockerfile:

FROM scardon/ruby-node-alpine:2.5.0

# install dependencies for nokigiri and postgres
RUN apk --update add \
    git \
    gcc \
    musl-dev \
    make \
    libxml2 \
    libxslt \
    libxml2-dev \
    libxslt-dev \
    postgresql-client \
    postgresql-dev \
    tzdata

# clean up files
RUN rm -rf /var/lib/apk/*

``

Any help would be appreciated.

When running in the console, it works just fine.

ActiveRecord::Migrator.migrate "db/migrate"

``

This mailing list (rubyonrails-core) is intended for discussion about development of the framework itself, not usage of it.

For support issues or usage questions like this one that are not issues with Rails itself, please post to the rubyonrails-talk mailing list (http://groups.google.com/group/rubyonrails-talk) or somewhere like StackOverflow using the ruby-on-rails tag (http://stackoverflow.com/questions/tagged/ruby-on-rails). You can also drop in to the #rubyonrails channel on irc.freenode.net for realtime help. You’ll be more likely to get a quick answer using one of those options.