We're Hiring!

Mattermost, Inc.

Mattermost docker file run cli command inside Dockerfile

I have installed mattermost using docker and it works fine. But I want to extend the current Dockerfile to run mattermost cli command. Here is what I have tried I add mattermost user create --email test@test.com --username testusername --password ComplexP@ssword1234. But it is not working. Can anyone help me on how to run cli commands after the container starts. I know I can execute a cli command using docker exec after starting the container. But I need to run the command inside the Dockerfile.