Comments (5)
Hey, I forgot about the Dockerfile. It’s not been updated and no longer works. If you’re up for fixing that I’m happy to accept a pull request, otherwise I will probably just remove it.
from gping.
I might could take a crack at a PR for a fix! I've never used rust - can you quickly enumerate the steps needed to compile outside of docker? I'll try and reproduce inside the container using the scaffold already in place.
from gping.
Sure! To compile outside of docker you just need to run “cargo build —release” (or better yet, cargo install). There are likely other dockerfiles you can use as a reference: https://www.docker.com/blog/simplify-your-deployments-using-the-rust-official-image/ for example.
from gping.
I think i'll have to give up on this. I tried a number of different ways, but couldn't get it to compile w/i docker.
My last attempt I had this docker file:
FROM rust as builder
WORKDIR /usr/src/
COPY * ./
RUN cargo install --path .
FROM debian:buster-slim
RUN apt-get update && apt-get install -y inetutils-ping && rm -rf /var/lib/apt/lists/*
COPY --from=builder /usr/local/cargo/bin/gping /usr/local/bin/gping
ENTRYPOINT ["gping"]
and this is the error I got:
docker build . -t gping
DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
Install the buildx component to build images with BuildKit:
https://docs.docker.com/go/buildx/
Sending build context to Docker daemon 1.372MB
Step 1/8 : FROM rust as builder
---> b13e19078869
Step 2/8 : WORKDIR /usr/src/
---> Using cache
---> d5fe8420c837
Step 3/8 : COPY * ./
---> 8429bc8d551f
Step 4/8 : RUN cargo install --path .
---> Running in f2f7ccb1ff30
Installing pinger v0.11.0 (/usr/src)
Updating crates.io index
Downloading crates ...
Downloaded thiserror-impl v1.0.40
Downloaded thiserror v1.0.40
Downloaded quote v1.0.28
Downloaded aho-corasick v1.0.1
Downloaded syn v2.0.18
Downloaded regex v1.8.3
Downloaded unicode-ident v1.0.9
Downloaded lazy_static v1.4.0
Downloaded proc-macro2 v1.0.59
Downloaded memchr v2.5.0
Downloaded anyhow v1.0.71
Downloaded regex-syntax v0.7.2
Compiling proc-macro2 v1.0.59
Compiling quote v1.0.28
Compiling unicode-ident v1.0.9
Compiling memchr v2.5.0
Compiling thiserror v1.0.40
Compiling anyhow v1.0.71
Compiling regex-syntax v0.7.2
Compiling pinger v0.11.0 (/usr/src)
Compiling lazy_static v1.4.0
error[E0433]: failed to resolve: use of undeclared crate or module `shadow_rs`
--> build.rs:1:14
|
1 | fn main() -> shadow_rs::SdResult<()> {
| ^^^^^^^^^ use of undeclared crate or module `shadow_rs`
error[E0433]: failed to resolve: use of undeclared crate or module `shadow_rs`
--> build.rs:2:5
|
2 | shadow_rs::new()
| ^^^^^^^^^ use of undeclared crate or module `shadow_rs`
For more information about this error, try `rustc --explain E0433`.
error: could not compile `pinger` due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `pinger v0.11.0 (/usr/src)`, intermediate artifacts can be found at `/usr/src/target`
from gping.
This is closed by #319, you should now be able to do:
docker run ghcr.io/orf/gping:master
(package here).
The next time I do a release it should be tagged properly, right now only master
is available.
from gping.
Related Issues (20)
- Does it also support TCP pings? HOT 1
- Print graph with special color/marker for failed commands HOT 1
- Installed ping is not supported: Please use iputils ping, not inetutils HOT 1
- Choose a more sensible default interval on OpenBSD. HOT 2
- Add option for packet size
- Unable to compile due to type inference issue on rustc 1.74.0 or higher HOT 1
- Cargo install gping fails with "type annotations needed" HOT 2
- [Feature Request] Add command line options to for a fixed Y axis scale
- Better indication that host are really dont answer / not exists / etc / instead of 0ms with empty chart [windows] HOT 2
- Hope to increase support for Chinese domain names
- Function additions and suggestions HOT 1
- [question] Using pinger as a library directly HOT 1
- View stats for the full execution time
- Interface Switch does not work in Windows
- Windows install through winget HOT 1
- Rename graphed targets HOT 2
- have proxyjump feature to get ping from target server via intermediary server HOT 1
- -4 is using ICMPv6 HOT 4
- [Feature request] "Tag" target hosts for better overview HOT 1
- Regression in tui 0.26.0: gping layout smooshed to 4 rows high when building HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gping.