Grafana don't build docker image - docker

i have a problem to build the docker image for grafana.
i'm trying to build the image with make build-docker-full-ubuntu but when
go is building there is an error and the procedure exit with an error:
go: downloading github.com/pmezard/go-difflib v1.0.0
generate go files
/go/bin/wire-v0.5.0 gen -tags "oss" ./pkg/server ./pkg/cmd/grafana-cli/runner
wire: github.com/grafana/grafana/pkg/server: wrote /src/grafana/pkg/server/wire_gen.go
wire: github.com/grafana/grafana/pkg/cmd/grafana-cli/runner: wrote /src/grafana/pkg/cmd/grafana-cli/runner/wire_gen.go
build go files
go run build.go build
Version: 9.0.7, Linux Version: 9.0.7, Package Iteration: 1660317595
building binaries build
building grafana-server ./pkg/cmd/grafana-server
rm -r ./bin/linux-amd64/grafana-server
rm -r ./bin/linux-amd64/grafana-server.md5
go build -ldflags -w -X main.version=9.0.7 -X main.commit=unknown-dev -X main.buildstamp=1660317595 -X main.buildBranch=main -o ./bin/linux-amd64/grafana-server ./pkg/cmd/grafana-server
embed.go:9:20: pattern cue: no matching files found
exit status 1
exit status 1
make: *** [Makefile:92: build-go] Error 1
The command '/bin/sh -c make build-go' returned a non-zero code: 2
make: *** [Makefile:157: build-docker-full-ubuntu] Errore 2
outer the build go is builded correctly but in the image builder fail.
Anyone can help me?
i'm using ubuntu 20.04 e the grafana version is 9.0.7
Thanks in advice

this is delayed but this might help someone. just elaborating on the resolved comment.
Need to copy the cue folder from the source to the docker
add this line in DockerFile
- COPY cue cue

Related

Docker selenium firefox image creation issue

I'm trying to create a selenium firefox node image. I've added the "COPY generate_config /opt/bin/generate_config" command to copy the generate_config file from local. Then when I run the command "RUN /opt/bin/generate_config > /opt/selenium/config.json" , I get error -
**# #10 0.320 /bin/sh: 1: /opt/bin/generate_config: not found
------**
executor failed running [/bin/sh -c /opt/bin/generate_config > /opt/selenium/config.json]: exit code: 127
Can anyone please help me with solution
I tried adding sudo, changing the cat command. nothing worked.

No matching package found (Docker + Rust)

I'm attempting to compile a Rust project in Docker and it's being frustrating. As far as I can tell it should be incredibly straightforward, but for some reason Docker can't find the Rust package.
Here's the Dockerfile:
FROM rust:1.6.1
COPY . .
RUN cargo build --release
CMD ["./run.sh"]
Here's the Cargo.toml:
[package]
name = "project1_1"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
utility = { path = "./src/utility" }
iced = "0.6.0"
iced_native = "0.4"
iced_style = "0.5"
iced_core = "0.5"
reqwest = { version = "0.11", features = ["json"] }
tokio = { version = "1", features = ["full"] }
webassembly = "0.8"
wry = "0.23.4"
And here's the output:
peterweyand#Peters-MacBook-Pro project1_1 % ./dockerrun.sh
2022/12/15 16:04:06 must use ASL logging (which requires CGO) if running as root
Sending build context to Docker daemon 1.351GB
Step 1/4 : FROM rust:1.6.1
manifest for rust:1.6.1 not found: manifest unknown: manifest unknown
Updating git repository `https://github.com/iced-rs/iced`
Updating crates.io index
error: no matching package found
searched package name: `iced`
perhaps you meant: cached
location searched: https://github.com/iced-rs/iced
required by package `project1_1 v0.1.0 (/)`
If instead of FROM rust:1.6.1 I use FROM rust:latest then Docker hangs like this:
peterweyand#Peters-MacBook-Pro project1_1 % ./dockerrun.sh
2022/12/15 16:08:18 must use ASL logging (which requires CGO) if running as root
Sending build context to Docker daemon 1.351GB
Step 1/4 : FROM rust:latest
---> 7767cd0ef4e0
Step 2/4 : COPY . .
---> 356cfb7caed9
Step 3/4 : RUN cargo build --release
---> Running in 87dbc6c86df9
Updating crates.io index
Does anyone have any ideas of what is going wrong?
EDIT: I usually suck at Docker because there are several ways of doing the same thing.
I tried this
FROM rust:1.66-alpine
WORKDIR /
COPY . .
RUN cargo install --path .
RUN apk add alpine-sdk # This one is necessary for linking cc.
COPY ./src/backend/Cargo.toml ./src/backend/Cargo.lock ./
RUN cargo build --release
CMD ["./run.sh"]
and it gave this output -
Compiling libloading v0.7.4
Compiling lock_api v0.4.9
Compiling parking_lot_core v0.9.5
Compiling toml v0.5.10
Compiling proc-macro-error-attr v1.0.4
Compiling proc-macro-error v1.0.4
Compiling parking_lot v0.12.1
Compiling anyhow v1.0.66
Compiling system-deps v6.0.3
error: linking with `cc` failed: exit status: 1
|
= note: "cc" "-Wl,--version-script=/tmp/rustc2quFlR/list" "/tmp/rustc2quFlR/symbols.o" "/target/release/deps/proc_macro_error_attr-4660f50c1ee088e6.proc_macro_error_attr.1df7e329-cgu.0.rcgu.o" "/target/release/deps/proc_macro_error_attr-4660f50c1ee088e6.proc_macro_error_attr.1df7e329-cgu.1.rcgu.o" "/target/release/deps/proc_macro_error_attr-4660f50c1ee088e6.proc_macro_error_attr.1df7e329-cgu.10.rcgu.o" "/target/release/deps/proc_macro_error_attr-4660f50c1ee088e6.proc_macro_error_attr.1df7e329-cgu.11.rcgu.o" "/target/release/deps/proc_macro_error_attr-4660f50c1ee088e6.proc_macro_error_attr.1df7e329-cgu.12.rcgu.o" "/target/release/deps/proc_macro_error_attr-4660f50c1ee088e6.proc_macro_error_attr.1df7e329-cgu.13.rcgu.o" "/target/release/deps/proc_macro_error_attr-4660f50c1ee088e6.proc_macro_error_attr.1df7e329-cgu.14.rcgu.o" "/target/release/deps/proc_macro_error_attr-4660f50c1ee088e6.proc_macro_error_attr.1df7e329-cgu.15.rcgu.o" "/target/release/deps/proc_macro_error_attr-4660f50c1ee088e6.proc_macro_error_attr.1df7e329-cgu.2.rcgu.o" "/target/release/deps/proc_macro_error_attr-4660f50c1ee088e6.proc_macro_error_attr.1df7e329-cgu.3.rcgu.o" "/target/release/deps/proc_macro_error_attr-4660f50c1ee088e6.proc_macro_error_attr.1df7e329-cgu.4.rcgu.o" "/target/release/deps/proc_macro_error_attr-4660f50c1ee088e6.proc_macro_error_attr.1df7e329-cgu.5.rcgu.o" "/target/release/deps/proc_macro_error_attr-4660f50c1ee088e6.proc_macro_error_attr.1df7e329-cgu.6.rcgu.o" "/target/release/deps/proc_macro_error_attr-4660f50c1ee088e6.proc_macro_error_attr.1df7e329-cgu.7.rcgu.o" "/target/release/deps/proc_macro_error_attr-4660f50c1ee088e6.proc_macro_error_attr.1df7e329-cgu.8.rcgu.o" "/target/release/deps/proc_macro_error_attr-4660f50c1ee088e6.proc_macro_error_attr.1df7e329-cgu.9.rcgu.o" "/target/release/deps/proc_macro_error_attr-4660f50c1ee088e6.2venke7z0qwetnto.rcgu.rmeta" "/target/release/deps/proc_macro_error_attr-4660f50c1ee088e6.2bt08o7nuxqqfzig.rcgu.o" "-Wl,--as-needed" "-L" "/target/release/deps" "-L" "/usr/local/rustup/toolchains/1.66.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib" "-Wl,-Bstatic" "/target/release/deps/libquote-a78ece94a3329b46.rlib" "/target/release/deps/libproc_macro2-3f4d87b0b9f5c5f5.rlib" "/target/release/deps/libunicode_ident-5c658c6e9005d30d.rlib" "/usr/local/rustup/toolchains/1.66.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/libproc_macro-16667debc3013ce2.rlib" "/usr/local/rustup/toolchains/1.66.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/libstd-19bcd24d54b4a32c.rlib" "/usr/local/rustup/toolchains/1.66.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/libpanic_unwind-3814851f75d61802.rlib" "/usr/local/rustup/toolchains/1.66.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/libobject-5007cbad366e7f54.rlib" "/usr/local/rustup/toolchains/1.66.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/libmemchr-c7fe0e6a7e22626a.rlib" "/usr/local/rustup/toolchains/1.66.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/libaddr2line-cdbb9a3725d71a8c.rlib" "/usr/local/rustup/toolchains/1.66.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/libgimli-ad66f8ef705486ae.rlib" "/usr/local/rustup/toolchains/1.66.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/librustc_demangle-775cf8425902e89f.rlib" "/usr/local/rustup/toolchains/1.66.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/libstd_detect-d09dc442a73afb02.rlib" "/usr/local/rustup/toolchains/1.66.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/libcfg_if-508c53ad79acc8ea.rlib" "/usr/local/rustup/toolchains/1.66.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/libhashbrown-ac7c150ef5940f2b.rlib" "/usr/local/rustup/toolchains/1.66.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/libminiz_oxide-d2c5dbbafb505b02.rlib" "/usr/local/rustup/toolchains/1.66.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/libadler-fa394ecd0326b64a.rlib" "/usr/local/rustup/toolchains/1.66.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/librustc_std_workspace_alloc-d36cf05357e3b9d8.rlib" "/usr/local/rustup/toolchains/1.66.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/libunwind-32953872cd386e07.rlib" "/usr/local/rustup/toolchains/1.66.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/libcfg_if-e844973f6e14767e.rlib" "/usr/local/rustup/toolchains/1.66.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/liblibc-2f732132bffc407e.rlib" "/usr/local/rustup/toolchains/1.66.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/liballoc-e0c40e7f51c7608f.rlib" "/usr/local/rustup/toolchains/1.66.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/librustc_std_workspace_core-3dc8593378fc4be9.rlib" "/usr/local/rustup/toolchains/1.66.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/libcore-d31b035ed558dec3.rlib" "/usr/local/rustup/toolchains/1.66.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/libcompiler_builtins-2b952fa9bf703518.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/usr/local/rustup/toolchains/1.66.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib" "-o" "/target/release/deps/libproc_macro_error_attr-4660f50c1ee088e6.so" "-Wl,--gc-sections" "-shared" "-Wl,-zrelro,-znow" "-nodefaultlibs"
= note: /usr/lib/gcc/aarch64-alpine-linux-musl/12.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: cannot find crti.o: No such file or directory
collect2: error: ld returned 1 exit status
error: could not compile `proc-macro-error-attr` due to previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `project1_1 v0.1.0 (/)`, intermediate artifacts can be found at `/target`
The command '/bin/sh -c cargo install --path .' returned a non-zero code: 101
Unable to find image 'my-rust-app:latest' locally
2022/12/15 17:31:02 must use ASL logging (which requires CGO) if running as root
docker: Error response from daemon: pull access denied for my-rust-app, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.
And I also tried this -
FROM ubuntu:latest
WORKDIR /
COPY . .
RUN apt-get update
RUN apt-get install protobuf-compiler openssl pkg-config libssl-dev rustc cmake cargo -y
RUN rustc -V
CMD ["./run.sh"]
But still ran into problems compiling dependencies that relied on C.
So, my question at this point is "What is the easiest way of getting a rust program to run with a standard list of dependencies?" The hello world examples don't cut it for any Rust program that has a large crate stack.
Thanks.

Imagemagick yasm singularity build fails

I am attempting to convert the docker file for :
https://hub.docker.com/r/dpokidov/imagemagick/
to singularity. The docker builds fine in docker. In my singularity def file the following line fails with the error.
yasm cmake
libde265-0 libde265-dev libjpeg62-turbo libjpeg62-turbo-dev x265 libx265-dev libtool
libpng16-16 libpng-dev libjpeg62-turbo libjpeg62-turbo-dev libwebp6 libwebp-dev libgomp1 libwebpmux3 libwebpdemux2 ghostscript
yasm cmake
yasm: warning: can open only one input file, only the last file will be processed
yasm: file name already has no extension: output will be in `yasm.out'
yasm: FATAL: Could not open input file
FATAL: failed to execute %post proc: exit status 1
FATAL: While performing build: while running engine: exit status 255
When I cut the list of names to 1 it still fails to open the file.
I can't find a reference for this with singularity.
The docker build looks the same and works fine. So I assume its a singularity thing?
Seems like something with the assembler and the build environment being a bit different than it's expecting.
Is there a reason you're creating a definition file from scratch rather than using the docker image directly? singularity pull docker://dpokidov/imagemagick should give you what you need.
If you want to make further changes to the image, you can also use:
Bootstrap: docker
From: dpokidov/imagemagick
%post
# custom stuff here

8th wall web app setup child compilation failed

I am new to 8th wall. I have cloned 8th wall web from git and executed below steps properly
# cd <directory_where_you_saved_sample_project_files>
# cd serve
# npm install
# cd ..
# ./serve/bin/serve -d <sample_project_location>
but on execution of last step which is for ex.
./serve/bin/serve -n -d gettingstarted/xraframe/ -p 7777
I am getting below errors
Failed to compile.
Error: Child compilation failed: Entry module not found: Error:
Can't resolve
'C:\8thWall_Project\web\serve\bin\gettingstarted\xraframe"
\index.html' in 'C:\8thWall_Project\web\serve': Error: Can't resolve
'C:\8thWall_Project\web\serve\bin\gettingstarted\xraframe"
\index.html' in 'C:\8thWall_Project\web\serve'
compiler.js:79 childCompiler.runAsChild
[serve]/[html-webpack-plugin]/lib/compiler.js:79:16
Compiler.js:306 compile
[serve]/[webpack]/lib/Compiler.js:306:11
Compiler.js:631 hooks.afterCompile.callAsync.err
[serve]/[webpack]/lib/Compiler.js:631:15
Hook.js:154 AsyncSeriesHook.lazyCompileHook
[serve]/[tapable]/lib/Hook.js:154:20
Compiler.js:628 compilation.seal.err
[serve]/[webpack]/lib/Compiler.js:628:31
Hook.js:154 AsyncSeriesHook.lazyCompileHook
[serve]/[tapable]/lib/Hook.js:154:20
Compilation.js:1325 hooks.optimizeAssets.callAsync.err
[serve]/[webpack]/lib/Compilation.js:1325:35
Any idea or pointers what is missing?
Thanks
I don't know why, but bat file don't want to be opened by path. Just go to the serve\bin directory and launch bat from here, like that:
7777 is unnecessary. problem was, that it can't find path to your xraframe
project, as you are in another directory, so you have to go tow directories up in ypur path for xraframe
It seems as if you're attempting this on a Windows computer. The serve process for Windows is slightly different than on macOS.
Instead of the normal serve script, use the serve.bat executable.
serve\bin\serve.bat -n -d gettingstarted\xraframe -p 7777
https://docs.8thwall.com/web/#locally-from-windows

cordova build error when `node cordova/lib/copy-www-build-step.js` in build phase

I am a web developer with no experience in iOS development. Now I'm using Cordova to build iOS app. Because I have no knowledge about iOS or Xcode, it is very hard for me. I always get error like the following output when I built in Xcode or built in command line.
Error info in Xcode build:
Run custome shell script 'Copy www directory'
PhaseScriptExecution Copy\ www\ directory /Users/jyjin/Library/Developer/Xcode/DerivedData/myios-auhioanpfinvvvcrnvoaioslreyr/Build/Intermediates.noindex/myios.build/Debug-iphonesimulator/myios.build/Script-304B58A110DAC018002A0835.sh (in target: myios)
cd /Users/jyjin/workspace/gitProject/Cordova/FirstProject/platforms/ios
/bin/sh -c /Users/jyjin/Library/Developer/Xcode/DerivedData/myios-auhioanpfinvvvcrnvoaioslreyr/Build/Intermediates.noindex/myios.build/Debug-iphonesimulator/myios.build/Script-304B58A110DAC018002A0835.sh
/Users/jyjin/Library/Developer/Xcode/DerivedData/myios-auhioanpfinvvvcrnvoaioslreyr/Build/Intermediates.noindex/myios.build/Debug-iphonesimulator/myios.build/Script-304B58A110DAC018002A0835.sh: line 2: 27158 Segmentation fault: 11 node cordova/lib/copy-www-build-step.js
Command PhaseScriptExecution failed with a nonzero exit code
Error info in command line build:
** BUILD FAILED **
The following build commands failed:
PhaseScriptExecution Copy\ www\ directory /Users/jyjin/Library/Developer/Xcode/DerivedData/myios-auhioanpfinvvvcrnvoaioslreyr/Build/Intermediates.noindex/myios.build/Debug-iphonesimulator/myios.build/Script-304B58A110DAC018002A0835.sh
(1 failure)
xcodebuild: Command failed with exit code 65
I have read a lot of solutions on websites, and finally I found that there were some script in build phase:
NODEJS_PATH=/usr/local/bin; NVM_NODE_PATH=~/.nvm/versions/node/`nvm version 2>/dev/null`/bin; N_NODE_PATH=`find /usr/local/n/versions/node/* -maxdepth 0 -type d 2>/dev/null | tail -1`/bin; XCODE_NODE_PATH=`xcode-select --print-path`/usr/share/xcs/Node/bin; PATH=$NODEJS_PATH:$NVM_NODE_PATH:$N_NODE_PATH:$XCODE_NODE_PATH:$PATH && node cordova/lib/copy-www-build-step.js
after checking out the error message several times, I tried to remove && node cordova/lib/copy-www-build-step.js in Build Phases, it builds successfully, but with no page effect expected in html (Cause no www resource copied I think).
and I tried to check out some env PATH value in copy-www-build-step.js,so I wrote some log code in copy-www-build-step.js, but have no idea how to print js logs in Xcode. Then I found cordova-plugin-console, but npm doc said it is duplicated, and contains the last version for Cordova, and mine is also the latest.
Oh, God!One week passed... I just want to build an iOS app. It’s so hard to play. The ghost knows what I experienced:Configuring certificates, profile, building a Cordova app from scratch, even spending $99 to buy an apple developer account...
Just want to play an iOS app by myself in my free time ... Hope someone can help me ~~
-- From a desperate Chinese boy !
just update cordova-ios to latest version:
npm i cordova-ios#latest
you can see this problem being solved in this PR: #600, they changed the script from javascript to the old shell version and fixed the problem.
Workaround without updating the library
Enter in xCode in the Build Phases tab and click on "Copy www directory" phase, so change the script to:
$SRCROOT/__PROJECT_NAME__/Scripts/copy-www-build-step.sh
"__PROJECT_NAME__ " is the name of xCode project.
After this download the copy-www-build-step.sh script and put it inside the "__PROJECT_NAME__/Scripts/" path.
References
https://github.com/apache/cordova-ios/issues/540
https://github.com/apache/cordova-ios/pull/600/files
https://github.com/apache/cordova-ios/pull/146/files
Oh! I have fixed it~
Firstly, check the script:
NODEJS_PATH=/usr/local/bin; NVM_NODE_PATH=~/.nvm/versions/node/`nvm version 2>/dev/null`/bin; N_NODE_PATH=`find /usr/local/n/versions/node/* -maxdepth 0 -type d 2>/dev/null | tail -1`/bin; XCODE_NODE_PATH=`xcode-select --print-path`/usr/share/xcs/Node/bin; PATH=$NODEJS_PATH:$NVM_NODE_PATH:$N_NODE_PATH:$XCODE_NODE_PATH:$PATH && node cordova/lib/copy-www-build-step.js
currently error is xcodebuild: Command failed with exit code 65. This is the first error, the && should be & when running in the mac.
And then, the error turn to be Command /bin/sh failed with exit code 127.And I found xcode error message: node: command not found.
So I run find /usr/local/n/versions/node/* -maxdepth 0 -type d 2>/dev/null | tail -1 in the command line. and get the node result path /usr/local/n/versions/node/11.12.0
run
node -v // v10.15.3
So I remove all script in build_phases, and give it node path for my real nvm node path, change build_phases like below:
/Users/jyjin/.nvm/versions/node/v10.15.3/bin/node cordova/lib/copy-www-build-step.js
Build success!
Summary! cordova auto build_phases script maybe not suit your environment, make sure build phase can get your node path!

Resources