Mattermost docker preview

I am an arch newbie and I have been trying to install preview of mattermost(slack alternative) on docker to try it out. I have been following the official guide.

Arch

  • envsubst command getting stuck in a container
  • Installing packages into ubuntu14.04 docker container
  • Docker composed services can't communicate by service name
  • Docker compose port mapping
  • Referencing a dynamic argument in the Docker Entrypoint
  • Docker removes downloaded files
  • Install Docker using the following commands:
    
    pacman -S docker
    systemctl enable docker.service
    systemctl start docker.service
    gpasswd -a <username> docker
    newgrp docker
    
    Start Docker container:
    
    docker run --name mattermost-preview -d --publish 8065:8065 mattermost/mattermost-preview
    
    When Docker is done fetching the image, open http://localhost:8065/ in your browser.
    

    Unfortunately I can’t open the localhost:8065 service.

    I have listed this issue in error trackers of both Docker
    https://github.com/docker/docker/issues/23730

    I installed it on ubuntu 14.04 and still encountering the same problem.

    output of docker info

    Containers: 3
     Running: 1
     Paused: 0
     Stopped: 2
    Images: 2
    Server Version: 1.11.2
    Storage Driver: aufs
     Root Dir: /var/lib/docker/aufs
     Backing Filesystem: extfs
     Dirs: 33
     Dirperm1 Supported: false
    Logging Driver: json-file
    Cgroup Driver: cgroupfs
    Plugins: 
     Volume: local
     Network: null host bridge
    Kernel Version: 3.13.0-32-generic
    Operating System: Ubuntu 14.04.1 LTS
    OSType: linux
    Architecture: x86_64
    CPUs: 4
    Total Memory: 3.767 GiB
    Name: warmachine
    ID: FICU:HLW6:7J7X:NFWJ:HX27:32U4:HQZB:I2UW:K5TI:DDAB:EBC3:F2LW
    Docker Root Dir: /var/lib/docker
    Debug mode (client): false
    Debug mode (server): false
    Registry: https://index.docker.io/v1/
    WARNING: No swap limit support
    

    output of docker version

    Client:
    Version:      1.11.2    
    API version:  1.23
    Go version:   go1.5.4
    Git commit:   b9f10c9
    Built:        Wed Jun  1 21:47:50 2016
    OS/Arch:      linux/amd64
    
    Server:
    Version:      1.11.2
    API version:  1.23
    Go version:   go1.5.4
    Git commit:   b9f10c9
    Built:        Wed Jun  1 21:47:50 2016
    OS/Arch:      linux/amd64
    

  • Why are all ports published by default with this Docker image
  • Does Spark Job Server have to be deployed on the same host as Spark Master?
  • Docker Swarm + Docker Compose: running linked containers on different nodes?
  • Change Docker machine location - Windows
  • Updating rather than replacing ECS Task Definition with CloudFormation
  • Run docker as non-root in a development environment for an specific process
  • 2 Solutions collect form web for “Mattermost docker preview”

    This appears to be an issue with the packaging of the app. It’s been reported on their github

    To rule out any issues with your own docker install, you can always test the port forwarding with something like:

    docker run -it --rm -p 8080:80 debian /bin/sh -c "apt-get update; apt-get install -yq netcat; nc -l -p 80"
    

    And then in another terminal:

    nc -q 1 127.0.0.1 8080 <<EOF
    hello world
    EOF
    

    If you see a “hello world” on the docker terminal, then your docker install is fine.

    In my case mysql is not yet ready at the time when mattermost starts.

    The solution is to clone the official repo to my local directory > Go into the directory > Edit docker-entry.sh file and change the line sleep 20 to some higher value like 100.

    After that execute

    docker build -t somename/mattermost .
    docker run --name mattermost-preview -d --publish 8065:8065 somename/mattermost

    If it still doesnt work replace 8065:8065 part with SomeRandomPort:8065 and execute above line with a different name for docker container.

    Thanks to https://github.com/joelnb for the solution.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.