This repository has been archived by the owner on Oct 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 343
theia-full-docker: include Rust + rls #50
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
set -x | ||
|
||
docker build \ | ||
--nocache \ | ||
--tag docker.io/colemickens/theia \ | ||
--build-arg version=next \ | ||
. | ||
|
||
docker run -it \ | ||
--volume /home/cole/code:/code \ | ||
--volume /home/cole/.gitconfig:/root/.gitconfig \ | ||
--volume /home/cole/.theia:/root/.theia \ | ||
--volume /home/cole/.cargo/registry:/root/.cargo/registry \ | ||
--volume /home/cole/.go:/root/.go \ | ||
--volume /etc/nixcfg:/nixcfg \ | ||
--volume /etc/nixpkgs:/nixpkgs \ | ||
--publish 0.0.0.0:1111:1111 \ | ||
--publish 0.0.0.0:3000:3000 \ | ||
--publish 0.0.0.0:5555:5555 \ | ||
--publish 0.0.0.0:5556:5556 \ | ||
docker.io/colemickens/theia | ||
|
||
exit | ||
|
||
# --env GOPATH=/code \ |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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:
There was a problem hiding this comment.
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.There was a problem hiding this comment.
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.There was a problem hiding this comment.
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.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.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 thechmod
and script execution may be an alternative: moby/moby#9547 (comment)This user has a theory about what's happening: moby/moby#9547 (comment)