Sign inSign up

willsquire/diesel-cli

By willsquire

•Updated 11 months ago

Minimalistic Diesel CLI container.

Image
1

10K+

willsquire/diesel-cli repository overview

⁠Diesel CLI

Minimalistic Diesel CLI container.

⁠Usage

Run Diesel CLI:

docker run willsquire/diesel-cli
⁠Commands

A practical example with setup:

docker run --rm \
  -v "$(pwd)":/app \
  --network="project_name_default" \
  willsquire/diesel-cli \
  --database-url="mysql://username:password@db_service/db_name" \
  setup

Note:

-v is the Rust project containing the migrates and config for Diesel.

--database-url is the database Diesel will connect to.

--network is needed only if the database is running within an existing docker network, e.g. in docker-compose. Usually the network name is the current directory name appended with _default.

See Diesel's docs for a full command list⁠

⁠Builds

Use in builds:

FROM willsquire/diesel-cli as builder
COPY . .
RUN diesel setup

Tag summary

Content type

Image

Digest

sha256:851d80ac7…

Size

602.6 MB

Last updated

11 months ago

docker pull willsquire/diesel-cli