Giter VIP home page Giter VIP logo

docker-rust's People

Contributors

conradkleinespel avatar scorpil avatar sean1708 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

docker-rust's Issues

Can't build backtrace-sys, a dependency of error-chain

It's probably worth including in the docker image whatever it takes to build error-chain, which some consider the first dependency every rust app should add. It looks like it currently can't build due to backtrace-sys's build script wanting to use /usr/bin/file, but I haven't looked deeply into it.

I saw this failure in the CI build for a lib of mine. Here's the output of the failure.

Running with gitlab-ci-multi-runner 1.10.4 (b32125f)
Using Docker executor with image scorpil/rust:stable ...
Pulling docker image scorpil/rust:stable ...
Running on runner-e11ae361-project-1691053-concurrent-0 via runner-e11ae361-machine-1486217056-45afdcd8-digital-ocean-4gb...
Cloning repository...
Cloning into '/builds/duelinmarkers/steel-cent'...
Checking out 213d20a4 as master...
Skipping Git submodules setup
Checking cache for test:stable/master...
Successfully extracted cache
$ mkdir target || echo "target already existed"
$ mkdir cargo || echo "cargo already existed"
$ du -hs target && du -hs cargo
8.0K	target
8.0K	cargo
$ rustc --version && cargo --version
rustc 1.14.0 (e8a012324 2016-12-16)
cargo 0.15.0-nightly (298a012 2016-12-20)
$ time cargo test --verbose --jobs 1 --release
    Updating registry `https://github.com/rust-lang/crates.io-index`
 Downloading error-chain v0.8.1
 Downloading lazy_static v0.2.2
 Downloading backtrace v0.3.0
 Downloading kernel32-sys v0.2.2
 Downloading rustc-demangle v0.1.3
 Downloading dbghelp-sys v0.2.0
 Downloading backtrace-sys v0.1.6
 Downloading libc v0.2.20
 Downloading cfg-if v0.1.0
 Downloading winapi v0.2.8
 Downloading winapi-build v0.1.1
 Downloading gcc v0.3.43
 Downloading csv v0.14.7
 Downloading byteorder v0.5.3
 Downloading rustc-serialize v0.3.22
   Compiling byteorder v0.5.3
     Running `rustc cargo/registry/src/github.com-1ecc6299db9ec823/byteorder-0.5.3/src/lib.rs --crate-name byteorder --crate-type lib -C opt-level=3 --cfg feature=\"default\" --cfg feature=\"std\" -C metadata=e4fc6ea0c49cabcf -C extra-filename=-e4fc6ea0c49cabcf --out-dir /builds/duelinmarkers/steel-cent/target/release/deps --emit=dep-info,link -L dependency=/builds/duelinmarkers/steel-cent/target/release/deps --cap-lints allow`
   Compiling gcc v0.3.43
     Running `rustc cargo/registry/src/github.com-1ecc6299db9ec823/gcc-0.3.43/src/lib.rs --crate-name gcc --crate-type lib -C opt-level=3 -C metadata=be7b7587fd240ec9 -C extra-filename=-be7b7587fd240ec9 --out-dir /builds/duelinmarkers/steel-cent/target/release/deps --emit=dep-info,link -L dependency=/builds/duelinmarkers/steel-cent/target/release/deps --cap-lints allow`
   Compiling cfg-if v0.1.0
     Running `rustc cargo/registry/src/github.com-1ecc6299db9ec823/cfg-if-0.1.0/src/lib.rs --crate-name cfg_if --crate-type lib -C opt-level=3 -C metadata=72c1f992b13d5087 -C extra-filename=-72c1f992b13d5087 --out-dir /builds/duelinmarkers/steel-cent/target/release/deps --emit=dep-info,link -L dependency=/builds/duelinmarkers/steel-cent/target/release/deps --cap-lints allow`
   Compiling backtrace v0.3.0
     Running `rustc cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.0/build.rs --crate-name build_script_build --crate-type bin -C opt-level=3 --cfg feature=\"coresymbolication\" --cfg feature=\"kernel32-sys\" --cfg feature=\"dladdr\" --cfg feature=\"winapi\" --cfg feature=\"dbghelp-sys\" --cfg feature=\"backtrace-sys\" --cfg feature=\"default\" --cfg feature=\"dbghelp\" --cfg feature=\"libunwind\" --cfg feature=\"libbacktrace\" -C metadata=4d922e79d0b3f0f4 --out-dir /builds/duelinmarkers/steel-cent/target/release/build/backtrace-4d922e79d0b3f0f4 --emit=dep-info,link -L dependency=/builds/duelinmarkers/steel-cent/target/release/deps --cap-lints allow`
   Compiling winapi-build v0.1.1
     Running `rustc cargo/registry/src/github.com-1ecc6299db9ec823/winapi-build-0.1.1/src/lib.rs --crate-name build --crate-type lib -C opt-level=3 -C metadata=493a7b0628804707 -C extra-filename=-493a7b0628804707 --out-dir /builds/duelinmarkers/steel-cent/target/release/deps --emit=dep-info,link -L dependency=/builds/duelinmarkers/steel-cent/target/release/deps --cap-lints allow`
   Compiling rustc-demangle v0.1.3
     Running `rustc cargo/registry/src/github.com-1ecc6299db9ec823/rustc-demangle-0.1.3/src/lib.rs --crate-name rustc_demangle --crate-type lib -C opt-level=3 -C metadata=9f84838926c47318 -C extra-filename=-9f84838926c47318 --out-dir /builds/duelinmarkers/steel-cent/target/release/deps --emit=dep-info,link -L dependency=/builds/duelinmarkers/steel-cent/target/release/deps --cap-lints allow`
   Compiling kernel32-sys v0.2.2
     Running `rustc cargo/registry/src/github.com-1ecc6299db9ec823/kernel32-sys-0.2.2/build.rs --crate-name build_script_build --crate-type bin -C opt-level=3 -C metadata=d6afa5bd3d7cfaef --out-dir /builds/duelinmarkers/steel-cent/target/release/build/kernel32-sys-d6afa5bd3d7cfaef --emit=dep-info,link -L dependency=/builds/duelinmarkers/steel-cent/target/release/deps --extern build=/builds/duelinmarkers/steel-cent/target/release/deps/libbuild-493a7b0628804707.rlib --cap-lints allow`
     Running `/builds/duelinmarkers/steel-cent/target/release/build/kernel32-sys-d6afa5bd3d7cfaef/build-script-build`
   Compiling libc v0.2.20
     Running `rustc cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.20/src/lib.rs --crate-name libc --crate-type lib -C opt-level=3 --cfg feature=\"use_std\" --cfg feature=\"default\" -C metadata=29ef97a68464c2b7 -C extra-filename=-29ef97a68464c2b7 --out-dir /builds/duelinmarkers/steel-cent/target/release/deps --emit=dep-info,link -L dependency=/builds/duelinmarkers/steel-cent/target/release/deps --cap-lints allow`
   Compiling dbghelp-sys v0.2.0
     Running `rustc cargo/registry/src/github.com-1ecc6299db9ec823/dbghelp-sys-0.2.0/build.rs --crate-name build_script_build --crate-type bin -C opt-level=3 -C metadata=63f6e37cae1a7d6b --out-dir /builds/duelinmarkers/steel-cent/target/release/build/dbghelp-sys-63f6e37cae1a7d6b --emit=dep-info,link -L dependency=/builds/duelinmarkers/steel-cent/target/release/deps --extern build=/builds/duelinmarkers/steel-cent/target/release/deps/libbuild-493a7b0628804707.rlib --cap-lints allow`
     Running `/builds/duelinmarkers/steel-cent/target/release/build/dbghelp-sys-63f6e37cae1a7d6b/build-script-build`
     Running `/builds/duelinmarkers/steel-cent/target/release/build/backtrace-4d922e79d0b3f0f4/build-script-build`
   Compiling winapi v0.2.8
     Running `rustc cargo/registry/src/github.com-1ecc6299db9ec823/winapi-0.2.8/src/lib.rs --crate-name winapi --crate-type lib -C opt-level=3 -C metadata=0889532d327ff4e2 -C extra-filename=-0889532d327ff4e2 --out-dir /builds/duelinmarkers/steel-cent/target/release/deps --emit=dep-info,link -L dependency=/builds/duelinmarkers/steel-cent/target/release/deps --cap-lints allow`
     Running `rustc cargo/registry/src/github.com-1ecc6299db9ec823/dbghelp-sys-0.2.0/src/lib.rs --crate-name dbghelp --crate-type lib -C opt-level=3 -C metadata=72843bd5c387f78b -C extra-filename=-72843bd5c387f78b --out-dir /builds/duelinmarkers/steel-cent/target/release/deps --emit=dep-info,link -L dependency=/builds/duelinmarkers/steel-cent/target/release/deps --extern winapi=/builds/duelinmarkers/steel-cent/target/release/deps/libwinapi-0889532d327ff4e2.rlib --cap-lints allow`
     Running `rustc cargo/registry/src/github.com-1ecc6299db9ec823/kernel32-sys-0.2.2/src/lib.rs --crate-name kernel32 --crate-type lib -C opt-level=3 -C metadata=df86a08647459244 -C extra-filename=-df86a08647459244 --out-dir /builds/duelinmarkers/steel-cent/target/release/deps --emit=dep-info,link -L dependency=/builds/duelinmarkers/steel-cent/target/release/deps --extern winapi=/builds/duelinmarkers/steel-cent/target/release/deps/libwinapi-0889532d327ff4e2.rlib --cap-lints allow`
   Compiling lazy_static v0.2.2
     Running `rustc cargo/registry/src/github.com-1ecc6299db9ec823/lazy_static-0.2.2/src/lib.rs --crate-name lazy_static --crate-type lib -C opt-level=3 -C metadata=7f1b96a3a3eb529d -C extra-filename=-7f1b96a3a3eb529d --out-dir /builds/duelinmarkers/steel-cent/target/release/deps --emit=dep-info,link -L dependency=/builds/duelinmarkers/steel-cent/target/release/deps --cap-lints allow`
   Compiling backtrace-sys v0.1.6
     Running `rustc cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-sys-0.1.6/build.rs --crate-name build_script_build --crate-type bin -C opt-level=3 -C metadata=e84e02e57cb850a4 --out-dir /builds/duelinmarkers/steel-cent/target/release/build/backtrace-sys-e84e02e57cb850a4 --emit=dep-info,link -L dependency=/builds/duelinmarkers/steel-cent/target/release/deps --extern gcc=/builds/duelinmarkers/steel-cent/target/release/deps/libgcc-be7b7587fd240ec9.rlib --cap-lints allow`
     Running `/builds/duelinmarkers/steel-cent/target/release/build/backtrace-sys-e84e02e57cb850a4/build-script-build`
error: failed to run custom build command for `backtrace-sys v0.1.6`
process didn't exit successfully: `/builds/duelinmarkers/steel-cent/target/release/build/backtrace-sys-e84e02e57cb850a4/build-script-build` (exit code: 101)
--- stdout
OPT_LEVEL = Some("3")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
TARGET = Some("x86_64-unknown-linux-gnu")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
CC_x86_64-unknown-linux-gnu = None
CC_x86_64_unknown_linux_gnu = None
HOST_CC = None
CC = None
HOST = Some("x86_64-unknown-linux-gnu")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
CFLAGS_x86_64-unknown-linux-gnu = None
CFLAGS_x86_64_unknown_linux_gnu = None
HOST_CFLAGS = None
CFLAGS = None
PROFILE = Some("release")
running: "/builds/duelinmarkers/steel-cent/cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-sys-0.1.6/src/libbacktrace/configure" "--with-pic" "--disable-multilib" "--disable-shared" "--disable-host-shared" "--target=x86_64-unknown-linux-gnu" "--host=x86_64-unknown-linux-gnu"
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for x86_64-unknown-linux-gnu-gcc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... no
checking whether to enable maintainer-specific portions of Makefiles... no
checking for x86_64-unknown-linux-gnu-gcc... (cached) cc
checking whether we are using the GNU C compiler... (cached) yes
checking whether cc accepts -g... (cached) yes
checking for cc option to accept ISO C89... (cached) none needed
checking for x86_64-unknown-linux-gnu-ranlib... no
checking for ranlib... ranlib
checking for gawk... (cached) mawk
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... no
checking for x86_64-unknown-linux-gnu-dumpbin... no
checking for x86_64-unknown-linux-gnu-link... no
checking for dumpbin... no
checking for link... link -dump
checking the name lister (nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for x86_64-unknown-linux-gnu-objdump... no
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for x86_64-unknown-linux-gnu-ar... no
checking for ar... ar
checking for x86_64-unknown-linux-gnu-strip... no
checking for strip... strip
checking for x86_64-unknown-linux-gnu-ranlib... ranlib
checking command to parse nm output from cc object... ok
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking unwind.h usability... yes
checking unwind.h presence... yes
checking for unwind.h... yes
checking for _Unwind_Backtrace... yes
checking for -funwind-tables option... yes
checking for -frandom-seed=string option... yes
checking whether cc supports -W... yes
checking whether cc supports -Wall... yes
checking whether cc supports -Wwrite-strings... yes
checking whether cc supports -Wstrict-prototypes... yes
checking whether cc supports -Wmissing-prototypes... yes
checking whether cc supports -Wold-style-definition... yes
checking whether cc supports -Wmissing-format-attribute... yes
checking whether cc supports -Wcast-qual... yes
checking for _Unwind_GetIPInfo... yes
checking __sync extensions... yes
checking __atomic extensions... yes
checking output filetype... elf64
looking for a compliant stdint.h in stdint.h, checking for uintmax_t... yes
checking for uintptr_t... yes
checking for int_least32_t... yes
checking for int_fast32_t... yes
checking for uint64_t... yes
checking what to include in gstdint.h... stdint.h (already complete)
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking for mmap... yes
checking link.h usability... yes
checking link.h presence... yes
checking for link.h... yes
checking for dl_iterate_phdr... yes
checking for fcntl... yes
checking whether strnlen is declared... yes
checking for getexecname... no
checking whether tests can run... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating backtrace-supported.h
config.status: creating config.h
config.status: executing libtool commands
config.status: executing gstdint.h commands
config.status: executing default commands
running: "make" "INCDIR=/builds/duelinmarkers/steel-cent/cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-sys-0.1.6/src/libbacktrace"

--- stderr
configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
/builds/duelinmarkers/steel-cent/cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-sys-0.1.6/src/libbacktrace/configure: line 6897: /usr/bin/file: No such file or directory
thread 'main' panicked at 'failed to get status: No such file or directory (os error 2)', cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-sys-0.1.6/build.rs:91
note: Run with `RUST_BACKTRACE=1` for a backtrace.

ERROR: Build failed: exit code 1

alpine + rustup

Hi,

@Scorpil you mentionned wanting to add alpine variant. have you started working on this ?

If not I'd like to help :)

would it be appropriate to build the alpine image with rustup in the same PR ?

I've looked at the repository quickly, but I want to make sure before starting, tell me if I've misunderstood something:

  • the py files in /manage/ are helpers, mainly create.py create the Dockerfiles & build.py build the image from the Dockerfiles and tag them. I probably will have to edit at least build.py
  • /templates/ contains the Dockerfile template that are used by create.py, I'll have to add Dockerfile_alpine.mustache (and maybe Dockerfile_alpine_onbuild.mustache)
  • docker-tags.yml might need some extra info (for rustup)

anything else ?

Add usage examples to documentation

It'd be great to be able to know what to do to get off the ground with an image like this, what kind of derivative images can be built, etc.

Feedback on the image

Hey,
Good work on building those images. I took inspiration from your repo to build my own image :
https://hub.docker.com/r/thibaultdelor/docker-rust/

Here is a bit of feedback on your image :

  • Image too big, the /rust directory could be entirely removed
  • Documentation is not needed either
  • On build image doesn't use the standard /usr/src/app directory (not a big deal and not really a standard but a lot of images are conforming to that, nodejs, python, ...)
  • On build image should have CMD before COPY to improve image caching
  • Setting DEBIAN_FRONTEND=noninteractive in the environment is not necessary, it can cause problem if someone run your image with docker run -ti
  • Having a beta and nightly tags seems to me that you are rebuilding the image for each changes.

Good work though! Hopefully we will have an official Rust image one day!

Switch from jessie to testing to support newer packages

I'm using your images for running CI builds of my two rust crates and one of them fails because jessie is running such old packages. This would be fixed for me if instead of debian jessie you built on debian testing. If you'd be amenable to this I could write a PR for it for this repo.

1.15 appears to be 1.14 actually

Both 1.15 and nightly tags currently report this:

root@9c993574d3a6:/rust# rustc --version
rustc 1.14.0-nightly (cae6ab1c4 2016-11-05)

incorrect versions/tags in hub.docker.com

tag 1.13 and 1.13-onbuild have beta version of 1.13, not stable

docker run -it --rm scorpil/rust:1.13 rustc --version
rustc 1.13.0-beta.3 (106d18793 2016-11-04)

I think that tags stable,1.13,latest,1 should tag to same image, but currently they have different sha256 sums and each image should be downloaded separatly

“Nightly” on Docker Hub isn’t updated automatically?

I’m not very familiar with Docker and Docker Hub yet, so I’m not sure if this is how things would normally be set up there, but I expected that scorpil/rust’s nightly tag would be less than one day old, containing the latest nightly build of Rust. Instead, it’s thirteen days old.

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.