Skip to content
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

Ctrl Click on FROM leads to a DockerHub link, instead of a stage in a multi-stage config #2043

Closed
samhwang opened this issue Jun 5, 2020 · 4 comments · Fixed by #2146
Closed

Comments

@samhwang
Copy link

samhwang commented Jun 5, 2020

Hey VSCode Docker team,

I just noticed that the recent update has made it possible to Ctrl+Click on the image name, and then open an appropriate one in DockerHub, which is fantastic! . So I just encountered this little issue, and absolutely not a deal breaker at all, but it would be nice to have it fixed.

The situation:

I want all my stages to have the same WORKDIR and LABEL, and EXPOSE-ing the same port, so I put an official image at the top, and made it a base stage. A snippet of what I'm working is like this.

FROM node:12-alpine as base
LABEL MAINTAINER="Sam Huynh"
WORKDIR /srv/app
EXPOSE 1337

# Dev dependencies
FROM base as dev_dependencies
COPY package.json yarn.lock ./
RUN yarn install && \
    yarn cache clean

# Dev stage
FROM base as development

COPY . .
COPY --from=dev_dependencies /srv/app/node_modules ./node_modules
CMD ["yarn", "develop"]

# Other stages
## Build something else...

Working:

  • Ctrl+Clicking on node in FROM node:12-alpine prompts me to open The official Node docker image, which is expected.
    Screenshot from 2020-06-05 10-24-11

  • Ctrl+clicking on dev_dependencies in --from=dev_dependencies brings me back to the that stage, which is also correct.
    Screenshot from 2020-06-05 10-27-08

Expected:

  • Ctrl+Clicking at base in FROM base goes back to the base stage.

What happened:

Please let me know if there are any other info I can put in here.

@rcjsuen
Copy link
Contributor

rcjsuen commented Jun 5, 2020

I just noticed that the recent update has made it possible to Ctrl+Click on the image name, and then open an appropriate one in DockerHub, which is fantastic! .

Interesting, that feature should have been there for at least a year now... 🤔 Well, glad you find it useful, @samhwang!

As to your issue, thank you for bringing this to my attention. I have opened two tickets to address this.

@samhwang
Copy link
Author

samhwang commented Jun 5, 2020

Yeah I just got it working at least a month ago while I started working on some Dockerfiles for another project, and I swear I never saw it before March. :P

@rcjsuen
Copy link
Contributor

rcjsuen commented Jul 11, 2020

@samhwang I have opened #2146 to address this. Thanks again for reporting this bug!

@bwateratmsft bwateratmsft linked a pull request Jul 13, 2020 that will close this issue
@bwateratmsft bwateratmsft modified the milestones: 1.5.0, 1.4.0 Jul 13, 2020
@bwateratmsft
Copy link
Contributor

We have released Docker 1.4.0 which contains a fix for this.

@vscodebot vscodebot bot locked and limited conversation to collaborators Aug 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants