File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 1
1
FROM ghcr.io/plc-lang/rust-llvm:latest
2
2
3
+ # Allow invoking `plc` from anywhere
4
+ ENV PATH="/opt/rusty:${PATH}"
5
+ ENV PLCLOC="/opt/rusty"
6
+ ENV STDLIBLOC="/opt/rusty/stdlib"
7
+
3
8
# Give all users access to cargo and rust home
4
9
RUN chmod -R a+rw $CARGO_HOME \
5
10
&& chmod -R a+rw $RUSTUP_HOME
@@ -11,10 +16,11 @@ RUN ln -sf /usr/bin/ld.lld-$LLVM_VER /usr/bin/ld.lld
11
16
# Install the local RuSTy version
12
17
WORKDIR /rusty
13
18
COPY . .
14
- RUN ./scripts/build.sh --build
15
-
16
- # Allow invoking `plc` from anywhere
17
- ENV PATH="/rusty/target/debug:${PATH}"
19
+ RUN ./scripts/build.sh --build --release && \
20
+ mkdir -p ${PLCLOC} && \
21
+ cp /rusty/target/release/plc ${PLCLOC} && \
22
+ cp /rusty/target/release/libiec61131std.a ${STDLIBLOC} && \
23
+ cp /rusty/target/release/libiec61131std.so ${STDLIBLOC}
18
24
19
25
ENTRYPOINT [ "/bin/bash" , "-c" ]
20
26
CMD ["plc" , "--help" ]
You can’t perform that action at this time.
0 commit comments