change to generic library

This commit is contained in:
Mike Kinney 2020-01-14 19:45:11 -08:00
parent b0e44dd258
commit 3a1628294a
1 changed files with 2 additions and 2 deletions

View File

@ -39,12 +39,12 @@ COPY . .
RUN cargo install --path . RUN cargo install --path .
FROM debian:buster-slim FROM debian:buster-slim
RUN apt-get update && apt-get install -y libssl-dev RUN apt-get update && apt-get install -y extra-runtime-dependencies
COPY --from=builder /usr/src/myapp/target/release/myapp /usr/local/bin/myapp COPY --from=builder /usr/src/myapp/target/release/myapp /usr/local/bin/myapp
CMD ["myapp"] CMD ["myapp"]
``` ```
Note: Some shared libraries may need to be installed as shown in the installation of the libssl line above. Note: Some shared libraries may need to be installed as shown in the installation of the `extra-runtime-dependencies` line above.
This method will create an image that is less than 200mb. If you switch to using the Alpine-based rust image, you might be able to save another 60mb. This method will create an image that is less than 200mb. If you switch to using the Alpine-based rust image, you might be able to save another 60mb.