Skip to content
This repository has been archived by the owner on Oct 5, 2022. It is now read-only.

theia-full-docker: include Rust + rls #50

Closed
wants to merge 2 commits into from

Conversation

colemickens
Copy link

@marcdumais-work
Copy link
Member

@colemickens I am not familiar with Rust. Maybe you could suggest a good mid-size project that I could clone and try, to confirm that the LS works in the full image?

@@ -110,6 +110,13 @@ RUN ln -s /usr/bin/clangd-6.0 /usr/bin/clangd
RUN apt-get update && apt-get install -y python python-pip
RUN pip install python-language-server

#Rust
RUN curl https://sh.rustup.rs -sSf > /tmp/rustup.sh
RUN chmod +x /tmp/rustup.sh && /tmp/rustup.sh -y
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When building the image on my Ubuntu 16.04 machine, I get the following error:

Step 41/53 : RUN chmod +x /tmp/rustup.sh && /tmp/rustup.sh -y
 ---> Running in 73694bf1a4f1
/bin/sh: 1: /tmp/rustup.sh: Text file busy
The command '/bin/sh -c chmod +x /tmp/rustup.sh && /tmp/rustup.sh -y' returned a non-zero code: 2

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replacing the line with RUN /bin/sh /tmp/rustup.sh -y seems to work for me.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand how there could be a difference here, unless something changed in the base image and you have an older base image cached.

I'm using this Dockerfile currently, without issue. Further, I can't imagine a script that /bin/sh could run that /bin/bash (presumably the default in Ubuntu) couldn't run.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the issue I encountered may be this one: moby/moby#9547

Nothing wrong as such with your version - technically it should work just as well. However the issue I reported happened consistently on my work laptop. The same Dockerfile builds fine on my (much faster) home desktop. According to the link above, it may be linked to the aufs storage driver. I do not remember if that's used on my work laptop, but it's not on my desktop, so that may be a factor.

unless something changed in the base image and you have an older base image cached

This image is self-contained and doesn't derive from the base image. I used --no-cache when building to make sure it was a clean build.

I can't imagine a script that /bin/sh could run that /bin/bash (presumably the default in Ubuntu) couldn't run.

looks like docker is using /bin/sh, so I used the same. from the error message: /bin/sh: 1: /tmp/rustup.sh: Text file busy. My goal was to avoid having to use chmod before executing the file, thus reducing the two commands to one.

Using a sync between the chmod and script execution may be an alternative: moby/moby#9547 (comment)

This user has a theory about what's happening: moby/moby#9547 (comment)

@marcdumais-work
Copy link
Member

Please sign your commit:

git commit --amend -s

@@ -21,6 +21,7 @@
"@theia/preferences": "latest",
"@theia/process": "latest",
"@theia/python": "latest",
"@theia/rust": "latest",
Copy link
Member

@marcdumais-work marcdumais-work Jul 6, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like @theia/rust is not yet published on npm, correct?

update: it is now

@stale
Copy link

stale bot commented Jul 16, 2019

This contribution has been automatically marked as stale due to inactivity, and it will be closed if no further activity occurs. Thank you for contributing to Theia!

@stale stale bot added the stale label Jul 16, 2019
@stale stale bot closed this Aug 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Theia Full does not contain the Rust plugin
2 participants