Mastodon: docker-compose error: "node:8.11.3-alpine as node" is not a valid repository/tag: invalid reference format

Created on 17 Aug 2018  路  5Comments  路  Source: tootsuite/mastodon

I'm new to docker and this may be a docker-compose issue. However, I was unable to find any information relating to this.
Following the docker-guide to build my own image, I cloned the git, moved the .env.production.sample to .env.production and ran docker-compose up. (docker-compose build would complain not being able to connect before running docker-compose up I got this error:

sudo docker-compose up
Creating network "mastodon_internal_network" with the default driver
Creating network "mastodon_external_network" with the default driver
Building web
Step 1/24 : FROM node:8.11.3-alpine as node
ERROR: Service 'web' failed to build: Error parsing reference: "node:8.11.3-alpine as node" is not a valid repository/tag: invalid reference format

  • [*] I searched or browsed the repo鈥檚 other issues to ensure this is not a duplicate.
  • [ ] This bug happens on a tagged release and not on master (If you're a user, don't worry about this).

All 5 comments

what version of docker are you running? iirc, the FROM image AS name syntax was added to support multi-stage builds, which requires 17.05 (or 17.06, can't quite remember), so maybe you need to update docker?

also, the docker-guide says you need docker-compose 1.10.0, are you using that version?

Yeah I think this is an older Docker version problem.

You can also avoid building locally by editing the docker-compose.yml file, it will use pre-built images from the hub then.

docker-compose is on version 1.17.1
docker is version 1.13.1
I installed both in fedora via dnf.

@GammaSQ docker changed it's versioning scheme after 1.13.1, so it goes 1.13.1, then 17.03.0, etc. So it looks like your docker version is a couple behind, which would be why you are getting that error.

Docker's "multi stage build" with keyword "as" is supported on Docker 17.05 or later.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

psychicteeth picture psychicteeth  路  3Comments

cwebber picture cwebber  路  3Comments

lauramichet picture lauramichet  路  3Comments

ghost picture ghost  路  3Comments

phryk picture phryk  路  3Comments