Update 2017/11/08: starting today, portainer/portainer comes with s390x support. Check out containerz.blogspot.com/2017/11/portainer-revisited.html for details; the steps below are not required anymore to run portainer.
If you prefer running it on s390x, there are some steps needed, as long as portainer doesn't build it for s390x:
Install all the pre-reqs (golang, node; also docker needs to be at a decent level >= 17.05 to support multi-stage Dockerfiles):
apt-get install -y golang npm nodejs-legacy(apt is Ubuntu-specific, use appropriate tooling to install on other distributions).
npm install -g bower grunt
npm install autoprefixer cssnano load-grunt-tasks \
grunt-config grunt-contrib-clean grunt-contrib-concat \
grunt-contrib-copy grunt-contrib-jshint \
grunt-contrib-uglify grunt-contrib-watch \
grunt-filerev grunt-html2js grunt-karma \
grunt-postcss grunt-replace grunt-shell grunt-usemin
Next, the build and portainer base container need to be built:
git clone https://github.com/portainer/golang-builder.gitUpdate 10/26: alpine is multi-arch, so no need anymore to change the Dockerfile.
docker build -t portainer/golang-builder:cross-platform .
git clone https://github.com/portainer/docker-images.git
docker build -t portainer/base .So let's build portainer:
git clone https://github.com/portainer/portainer.gitNow gruntfile.js contains amd64 and should have s390x -- replace the first three occurrences, i.e. in grunt.registerTask and the docker run command). A PR for (a cleaner implementation of) that is merged upstream meanwhile, so with 1.15.1, this will not be needed anymore.
git checkout 1.15.0
bower install --allow-root
If you like, you can now use grunt build and grunt run-dev to run portainer locally without building a container image. To build a container image, edit build.sh: at the end of the file, the build_all statement declares the target platforms. Make this a build_all 'linux-s390x' (or just add linux-s390x to the list to build for all platforms). This last change is upstream already.
./build.sh 1.15.0To run portainer, create a data directory and start the container:
docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v /opt/portainer:/data portainer/portainer:linux-s390xYou can now point your browser to port 9000 and use portainer: