Update cargo install command

Using `cargo install` to install the binaries for the package in current working directory is no longer supported, use `cargo install --path .` instead.

Also updated image version in the example to the current one.
This commit is contained in:
German Lashevich 2019-01-06 22:56:22 +01:00 committed by GitHub
parent 44b703f99f
commit d24b7323da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -13,12 +13,12 @@ Rust is a systems programming language sponsored by Mozilla Research. It is desi
The most straightforward way to use this image is to use a Rust container as both the build and runtime environment. In your `Dockerfile`, writing something along the lines of the following will compile and run your project: The most straightforward way to use this image is to use a Rust container as both the build and runtime environment. In your `Dockerfile`, writing something along the lines of the following will compile and run your project:
```dockerfile ```dockerfile
FROM %%IMAGE%%:1.23.0 FROM %%IMAGE%%:1.31
WORKDIR /usr/src/myapp WORKDIR /usr/src/myapp
COPY . . COPY . .
RUN cargo install RUN cargo install --path /usr/src/myapp
CMD ["myapp"] CMD ["myapp"]
``` ```