|
1 |
| -# FROM mcr.microsoft.com/vscode/devcontainers/rust:latest |
2 | 1 | FROM ghcr.io/plc-lang/rust-llvm:latest
|
3 | 2 |
|
4 |
| -# Avoid warnings by switching to noninteractive |
5 |
| -ENV DEBIAN_FRONTEND=noninteractive |
6 |
| - |
7 |
| -# This Dockerfile adds a non-root user with sudo access. Use the "remoteUser" |
8 |
| -# property in devcontainer.json to use it. On Linux, the container user's GID/UIDs |
9 |
| -# will be updated to match your local UID/GID (when using the dockerFile property). |
10 |
| -# See https://aka.ms/vscode-remote/containers/non-root-user for details. |
11 |
| -# ARG USERNAME=vscode |
12 |
| -# ARG USER_UID=1000 |
13 |
| -# ARG USER_GID=$USER_UID |
14 |
| - |
15 |
| -# # Create a non-root user to use if preferred - see https://aka.ms/vscode-remote/containers/non-root-user. |
16 |
| -# RUN groupadd --gid $USER_GID $USERNAME \ |
17 |
| -# && useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \ |
18 |
| -# # [Optional] Add sudo support for the non-root user |
19 |
| -# && apt-get install -y sudo \ |
20 |
| -# && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME\ |
21 |
| -# && chmod 0440 /etc/sudoers.d/$USERNAME |
22 |
| - |
23 |
| -# RUN apt-get -y update |
24 |
| -# RUN apt-get -y install git gdb docker.io |
25 |
| - |
26 |
| -# RUN cargo install cargo-insta cargo-watch |
27 |
| - |
28 | 3 | # Give all users access to cargo and rust home
|
29 | 4 | RUN chmod -R a+rw $CARGO_HOME \
|
30 | 5 | && chmod -R a+rw $RUSTUP_HOME
|
31 | 6 |
|
32 |
| -# Switch back to dialog for any ad-hoc use of apt-get |
33 |
| -ENV DEBIAN_FRONTEND=dialog |
34 |
| -ENV LLVM_VER=14 |
35 |
| - |
36 | 7 | # Required if we want to use `lld` as the default linker for RuSTy
|
| 8 | +ENV LLVM_VER=14 |
37 | 9 | RUN ln -sf /usr/bin/ld.lld-$LLVM_VER /usr/bin/ld.lld
|
38 | 10 |
|
39 | 11 | # Install the local RuSTy version
|
40 | 12 | WORKDIR /rusty
|
41 | 13 | COPY . .
|
42 |
| -RUN sed -i 's/build=0/build=1/' ./scripts/build.sh && \ |
43 |
| - ./scripts/build.sh |
| 14 | +RUN ./scripts/build.sh --build |
44 | 15 |
|
45 | 16 | # Allow invoking `plc` from anywhere
|
46 | 17 | ENV PATH="/rusty/target/debug:${PATH}"
|
|
0 commit comments