Refactor Dockerfile and docker-compose for improved build process and clarity
This commit is contained in:
@@ -20,5 +20,8 @@ RUN pacman -Syu --noconfirm --needed \
|
|||||||
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
|
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
|
||||||
ENV PATH="/root/.cargo/bin:${PATH}"
|
ENV PATH="/root/.cargo/bin:${PATH}"
|
||||||
|
|
||||||
|
WORKDIR /opt/black_hole_share
|
||||||
|
RUN cargo build --release && cp ./target/release/black_hole_share /usr/local/bin/black_hole_share && black_hole_share;
|
||||||
|
|
||||||
WORKDIR /data
|
WORKDIR /data
|
||||||
CMD cargo build --release && cp ./target/release/black_hole_share /usr/local/bin/black_hole_share && black_hole_share;
|
CMD [ "black_hole_share" ]
|
||||||
@@ -6,9 +6,9 @@ services:
|
|||||||
container_name: black_hole_share
|
container_name: black_hole_share
|
||||||
volumes:
|
volumes:
|
||||||
- ./data:/data
|
- ./data:/data
|
||||||
- ./src:/data/src
|
- ./src:/opt/bhs
|
||||||
- ./Cargo.lock:/data/Cargo.lock
|
- ./Cargo.lock:/opt/bhs/Cargo.lock
|
||||||
- ./Cargo.toml:/data/Cargo.toml
|
- ./Cargo.toml:/opt/bhs/Cargo.toml
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
|
|
||||||
labels:
|
labels:
|
||||||
|
|||||||
Reference in New Issue
Block a user