Skip to content

Commit e85a57a

Browse files
committed
update paths
1 parent 6238d92 commit e85a57a

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

Dockerfile

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
FROM ghcr.io/plc-lang/rust-llvm:latest
22

3+
# Allow invoking `plc` from anywhere
4+
ENV PATH="/opt/rusty:${PATH}"
5+
ENV PLCLOC="/opt/rusty"
6+
ENV STDLIBLOC="/opt/rusty/stdlib"
7+
38
# Give all users access to cargo and rust home
49
RUN chmod -R a+rw $CARGO_HOME \
510
&& chmod -R a+rw $RUSTUP_HOME
@@ -11,10 +16,11 @@ RUN ln -sf /usr/bin/ld.lld-$LLVM_VER /usr/bin/ld.lld
1116
# Install the local RuSTy version
1217
WORKDIR /rusty
1318
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}
1824

1925
ENTRYPOINT [ "/bin/bash", "-c" ]
2026
CMD ["plc", "--help"]

0 commit comments

Comments
 (0)