Add Dockerfile

This commit is contained in:
fabianlindfors 2021-12-28 16:44:52 +01:00
parent fda6dc8f40
commit db36ba0c1b
3 changed files with 12 additions and 4 deletions

2
.dockerignore Normal file
View File

@ -0,0 +1,2 @@
/target
Cargo.lock

9
Dockerfile Normal file
View File

@ -0,0 +1,9 @@
FROM rust:1.57.0 AS builder
WORKDIR /usr/src/reshape
COPY . .
RUN cargo build --release
FROM debian:bullseye AS runtime
WORKDIR /usr/share/app
COPY --from=builder /usr/src/reshape/target/release/reshape /usr/local/bin/reshape
CMD ["reshape"]

View File

@ -44,10 +44,7 @@ Binaries are available for macOS and Linux under [Releases](https://github.com/f
Reshape is available as a Docker image on [Docker Hub](https://hub.docker.com/repository/docker/fabianlindfors/reshape).
```shell
docker run \
-v $(pwd):/usr/share/app \ #
fabianlindfors/reshape \
reshape migrate
docker run -v $(pwd):/usr/share/app fabianlindfors/reshape reshape migrate
```
### Creating your first migration