fix build and set entrypoint
This commit is contained in:
parent
def84c5c4d
commit
7eb631b3fb
5 changed files with 25 additions and 8 deletions
11
Cargo.lock
generated
11
Cargo.lock
generated
|
@ -538,6 +538,7 @@ dependencies = [
|
|||
"emojis",
|
||||
"enum-iterator",
|
||||
"macros",
|
||||
"openssl",
|
||||
"redis",
|
||||
"serde",
|
||||
"serde_repr",
|
||||
|
@ -1058,6 +1059,15 @@ dependencies = [
|
|||
"syn 2.0.68",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "openssl-src"
|
||||
version = "300.3.1+3.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7259953d42a81bf137fbbd73bd30a8e1914d6dce43c2b90ed575783a22608b91"
|
||||
dependencies = [
|
||||
"cc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "openssl-sys"
|
||||
version = "0.9.102"
|
||||
|
@ -1066,6 +1076,7 @@ checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2"
|
|||
dependencies = [
|
||||
"cc",
|
||||
"libc",
|
||||
"openssl-src",
|
||||
"pkg-config",
|
||||
"vcpkg",
|
||||
]
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
[workspace]
|
||||
members = ["fishctl", "macros"]
|
||||
default-members = ["fishctl"]
|
||||
resolver = "2"
|
||||
|
||||
[workspace.dependencies]
|
||||
|
@ -24,5 +25,8 @@ vapid = "0.6.0"
|
|||
validator = "0.18.1"
|
||||
yaml-rust = "0.4.5"
|
||||
|
||||
# subdependency
|
||||
openssl = "0.10.64"
|
||||
|
||||
[profile.release]
|
||||
lto = true
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
FROM docker.io/rust:alpine AS builder
|
||||
WORKDIR /fishctl
|
||||
WORKDIR /repository
|
||||
COPY . .
|
||||
RUN apk add --no-cache musl-dev
|
||||
RUN cargo install --locked --path .
|
||||
RUN apk add --no-cache musl-dev build-base perl
|
||||
RUN cargo install --locked --path fishctl
|
||||
|
||||
FROM docker.io/busybox:musl
|
||||
COPY README.md LICENSE-APACHE LICENSE-MIT ./
|
||||
COPY README.md LICENSE-APACHE LICENSE-MIT .
|
||||
COPY --from=builder /usr/local/cargo/bin/fishctl /usr/local/bin/fishctl
|
||||
WORKDIR /firefish
|
||||
ENTRYPOINT ["fishctl"]
|
||||
|
|
|
@ -42,14 +42,12 @@ Using the `registry.firefish.dev/firefish/fishctl` container image, `fishctl ___
|
|||
# (i.e., the Firefish local repository directory)
|
||||
|
||||
docker run -it --rm --volume "$(pwd)":/firefish --network network_name \
|
||||
registry.firefish.dev/firefish/fishctl \
|
||||
fishctl ___
|
||||
registry.firefish.dev/firefish/fishctl ___
|
||||
|
||||
# or
|
||||
|
||||
podman run -it --rm --volume "$(pwd)":/firefish --network network_name \
|
||||
registry.firefish.dev/firefish/fishctl \
|
||||
fishctl ___
|
||||
registry.firefish.dev/firefish/fishctl ___
|
||||
```
|
||||
|
||||
Where `network_name` is the network name on which the database is running. If you want to use this for the host network (i.e., use the container as if it were a locally installed command), you should replace `network_name` with `host`.
|
||||
|
|
|
@ -25,3 +25,6 @@ url = { workspace = true }
|
|||
vapid = { workspace = true }
|
||||
validator = { workspace = true, features = ["derive"] }
|
||||
yaml-rust = { workspace = true }
|
||||
|
||||
# subdependency
|
||||
openssl = { workspace = true, features = ["vendored"] }
|
||||
|
|
Loading…
Reference in a new issue