feat(docker): add docker functionality.
This commit is contained in:
parent
fabaafbbe7
commit
e4f14f9531
6 changed files with 61 additions and 3 deletions
30
Dockerfile
Normal file
30
Dockerfile
Normal file
|
@ -0,0 +1,30 @@
|
|||
FROM rust
|
||||
|
||||
COPY Cargo.toml /app/Cargo.toml
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN mkdir src && \
|
||||
echo "fn main() {println!(\"if you see this, the build broke\")}" > src/main.rs && \
|
||||
cargo build --release && \
|
||||
rm -r target/release/deps/bumblebee*
|
||||
|
||||
COPY src /app/src
|
||||
|
||||
RUN cargo build --release
|
||||
|
||||
RUN cp target/release/bumblebee /app/bumblebee
|
||||
|
||||
# -- #
|
||||
|
||||
COPY docker/docker-entrypoint.sh /docker-entrypoint.sh
|
||||
COPY docker/docker-entrypoint.d/ /docker-entrypoint.d
|
||||
RUN chmod +x /docker-entrypoint.sh
|
||||
|
||||
ENV CONFIG_PATH=/config/config.toml
|
||||
|
||||
VOLUME /config
|
||||
VOLUME /data/input
|
||||
VOLUME /data/output
|
||||
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
Loading…
Add table
Add a link
Reference in a new issue