New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
GammaSQ opened this Issue Aug 17, 2018 · 5 comments

Comments

Projects
None yet
4 participants
@GammaSQ

GammaSQ commented Aug 17, 2018

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’s 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).
@pwoolcoc

This comment has been minimized.

Contributor

pwoolcoc commented Aug 17, 2018

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?

@Gargron

This comment has been minimized.

Member

Gargron commented Aug 17, 2018

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.

@Gargron Gargron closed this Aug 17, 2018

@GammaSQ

This comment has been minimized.

GammaSQ commented Aug 17, 2018

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

@pwoolcoc

This comment has been minimized.

Contributor

pwoolcoc commented Aug 17, 2018

@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.

@tateisu

This comment has been minimized.

Contributor

tateisu commented Sep 3, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment