Skip to content

Commit 46603d6

Browse files
committed
cleanup dockerfile
1 parent ace2ccf commit 46603d6

File tree

1 file changed

+2
-31
lines changed

1 file changed

+2
-31
lines changed

Dockerfile

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,17 @@
1-
# FROM mcr.microsoft.com/vscode/devcontainers/rust:latest
21
FROM ghcr.io/plc-lang/rust-llvm:latest
32

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-
283
# Give all users access to cargo and rust home
294
RUN chmod -R a+rw $CARGO_HOME \
305
&& chmod -R a+rw $RUSTUP_HOME
316

32-
# Switch back to dialog for any ad-hoc use of apt-get
33-
ENV DEBIAN_FRONTEND=dialog
34-
ENV LLVM_VER=14
35-
367
# Required if we want to use `lld` as the default linker for RuSTy
8+
ENV LLVM_VER=14
379
RUN ln -sf /usr/bin/ld.lld-$LLVM_VER /usr/bin/ld.lld
3810

3911
# Install the local RuSTy version
4012
WORKDIR /rusty
4113
COPY . .
42-
RUN sed -i 's/build=0/build=1/' ./scripts/build.sh && \
43-
./scripts/build.sh
14+
RUN ./scripts/build.sh --build
4415

4516
# Allow invoking `plc` from anywhere
4617
ENV PATH="/rusty/target/debug:${PATH}"

0 commit comments

Comments
 (0)