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",
|
"emojis",
|
||||||
"enum-iterator",
|
"enum-iterator",
|
||||||
"macros",
|
"macros",
|
||||||
|
"openssl",
|
||||||
"redis",
|
"redis",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_repr",
|
"serde_repr",
|
||||||
|
@ -1058,6 +1059,15 @@ dependencies = [
|
||||||
"syn 2.0.68",
|
"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]]
|
[[package]]
|
||||||
name = "openssl-sys"
|
name = "openssl-sys"
|
||||||
version = "0.9.102"
|
version = "0.9.102"
|
||||||
|
@ -1066,6 +1076,7 @@ checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cc",
|
"cc",
|
||||||
"libc",
|
"libc",
|
||||||
|
"openssl-src",
|
||||||
"pkg-config",
|
"pkg-config",
|
||||||
"vcpkg",
|
"vcpkg",
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
[workspace]
|
[workspace]
|
||||||
members = ["fishctl", "macros"]
|
members = ["fishctl", "macros"]
|
||||||
|
default-members = ["fishctl"]
|
||||||
resolver = "2"
|
resolver = "2"
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
|
@ -24,5 +25,8 @@ vapid = "0.6.0"
|
||||||
validator = "0.18.1"
|
validator = "0.18.1"
|
||||||
yaml-rust = "0.4.5"
|
yaml-rust = "0.4.5"
|
||||||
|
|
||||||
|
# subdependency
|
||||||
|
openssl = "0.10.64"
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
lto = true
|
lto = true
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
FROM docker.io/rust:alpine AS builder
|
FROM docker.io/rust:alpine AS builder
|
||||||
WORKDIR /fishctl
|
WORKDIR /repository
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN apk add --no-cache musl-dev
|
RUN apk add --no-cache musl-dev build-base perl
|
||||||
RUN cargo install --locked --path .
|
RUN cargo install --locked --path fishctl
|
||||||
|
|
||||||
FROM docker.io/busybox:musl
|
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
|
COPY --from=builder /usr/local/cargo/bin/fishctl /usr/local/bin/fishctl
|
||||||
WORKDIR /firefish
|
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)
|
# (i.e., the Firefish local repository directory)
|
||||||
|
|
||||||
docker run -it --rm --volume "$(pwd)":/firefish --network network_name \
|
docker run -it --rm --volume "$(pwd)":/firefish --network network_name \
|
||||||
registry.firefish.dev/firefish/fishctl \
|
registry.firefish.dev/firefish/fishctl ___
|
||||||
fishctl ___
|
|
||||||
|
|
||||||
# or
|
# or
|
||||||
|
|
||||||
podman run -it --rm --volume "$(pwd)":/firefish --network network_name \
|
podman run -it --rm --volume "$(pwd)":/firefish --network network_name \
|
||||||
registry.firefish.dev/firefish/fishctl \
|
registry.firefish.dev/firefish/fishctl ___
|
||||||
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`.
|
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 }
|
vapid = { workspace = true }
|
||||||
validator = { workspace = true, features = ["derive"] }
|
validator = { workspace = true, features = ["derive"] }
|
||||||
yaml-rust = { workspace = true }
|
yaml-rust = { workspace = true }
|
||||||
|
|
||||||
|
# subdependency
|
||||||
|
openssl = { workspace = true, features = ["vendored"] }
|
||||||
|
|
Loading…
Reference in a new issue