GithubHelp home page GithubHelp logo

Comments (5)

orf avatar orf commented on June 15, 2024

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.

mrjones-plip avatar mrjones-plip commented on June 15, 2024

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.

orf avatar orf commented on June 15, 2024

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.

mrjones-plip avatar mrjones-plip commented on June 15, 2024

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.

orf avatar orf commented on June 15, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.