Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add basic docker config #27

Merged
merged 8 commits into from
Aug 21, 2020
Merged

Add basic docker config #27

merged 8 commits into from
Aug 21, 2020

Conversation

redfast00
Copy link
Member

@redfast00 redfast00 commented Aug 7, 2020

Fixes #26

Waiting for the changes in #24

Dockerfile Outdated
@@ -0,0 +1,12 @@
FROM rustlang/rust:nightly-buster
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not nightly-alpine?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-Wl,--eh-frame-hdr" "-L" "/usr/local/rustup/toolchains/nightly-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib" "/tmp/cargo-install8JFV7u/release/deps/derive_error_chain-ac2bf6b2651ecfc0.derive_error_chain.5db38vqr-cgu.0.rcgu.o" "/tmp/cargo-install8JFV7u/release/deps/derive_error_chain-ac2bf6b2651ecfc0.derive_error_chain.5db38vqr-cgu.1.rcgu.o" "/tmp/cargo-install8JFV7u/release/deps/derive_error_chain-ac2bf6b2651ecfc0.derive_error_chain.5db38vqr-cgu.10.rcgu.o" "/tmp/cargo-install8JFV7u/release/deps/derive_error_chain-ac2bf6b2651ecfc0.derive_error_chain.5db38vqr-cgu.11.rcgu.o" "/tmp/cargo-install8JFV7u/release/deps/derive_error_chain-ac2bf6b2651ecfc0.derive_error_chain.5db38vqr-cgu.12.rcgu.o" "/tmp/cargo-install8JFV7u/release/deps/derive_error_chain-ac2bf6b2651ecfc0.derive_error_chain.5db38vqr-cgu.13.rcgu.o" "/tmp/cargo-install8JFV7u/release/deps/derive_error_chain-ac2bf6b2651ecfc0.derive_error_chain.5db38vqr-cgu.14.rcgu.o" "/tmp/cargo-install8JFV7u/release/deps/derive_error_chain-ac2bf6b2651ecfc0.derive_error_chain.5db38vqr-cgu.15.rcgu.o" "/tmp/cargo-install8JFV7u/release/deps/derive_error_chain-ac2bf6b2651ecfc0.derive_error_chain.5db38vqr-cgu.2.rcgu.o" "/tmp/cargo-install8JFV7u/release/deps/derive_error_chain-ac2bf6b2651ecfc0.derive_error_chain.5db38vqr-cgu.3.rcgu.o" "/tmp/cargo-install8JFV7u/release/deps/derive_error_chain-ac2bf6b2651ecfc0.derive_error_chain.5db38vqr-cgu.4.rcgu.o" "/tmp/cargo-install8JFV7u/release/deps/derive_error_chain-ac2bf6b2651ecfc0.derive_error_chain.5db38vqr-cgu.5.rcgu.o" "/tmp/cargo-install8JFV7u/release/deps/derive_error_chain-ac2bf6b2651ecfc0.derive_error_chain.5db38vqr-cgu.6.rcgu.o" "/tmp/cargo-install8JFV7u/release/deps/derive_error_chain-ac2bf6b2651ecfc0.derive_error_chain.5db38vqr-cgu.7.rcgu.o" "/tmp/cargo-install8JFV7u/release/deps/derive_error_chain-ac2bf6b2651ecfc0.derive_error_chain.5db38vqr-cgu.8.rcgu.o" "/tmp/cargo-install8JFV7u/release/deps/derive_error_chain-ac2bf6b2651ecfc0.derive_error_chain.5db38vqr-cgu.9.rcgu.o" "-o" "/tmp/cargo-install8JFV7u/release/deps/libderive_error_chain-ac2bf6b2651ecfc0.so" "/tmp/cargo-install8JFV7u/release/deps/derive_error_chain-ac2bf6b2651ecfc0.wj7o0flatrloasv.rcgu.o" "/tmp/cargo-install8JFV7u/release/deps/derive_error_chain-ac2bf6b2651ecfc0.qt01va11sns2bmb.rcgu.o" "-Wl,--gc-sections" "-shared" "-Wl,-zrelro" "-Wl,-znow" "-nodefaultlibs" "-L" "/tmp/cargo-install8JFV7u/release/deps" "-L" "/usr/local/rustup/toolchains/nightly-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib" "-Wl,-Bstatic" "/tmp/cargo-install8JFV7u/release/deps/libsyn-b9d1505e875bafd3.rlib" "/tmp/cargo-install8JFV7u/release/deps/libsynom-200f8eb2dfbc5db6.rlib" "/tmp/cargo-install8JFV7u/release/deps/libunicode_xid-bd03d31ed2e6f367.rlib" "/tmp/cargo-install8JFV7u/release/deps/libquote-63b0af337882db37.rlib" "/usr/local/rustup/toolchains/nightly-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/libproc_macro-d431102ce63d2fa2.rlib" "-Wl,--start-group" "/usr/local/rustup/toolchains/nightly-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/libstd-379553a825b2caae.rlib" "/usr/local/rustup/toolchains/nightly-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/libpanic_unwind-3cad57a77eb09624.rlib" "/usr/local/rustup/toolchains/nightly-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/libminiz_oxide-da8fb3a05f42839c.rlib" "/usr/local/rustup/toolchains/nightly-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/libadler-7c7d7f769799a9bf.rlib" "/usr/local/rustup/toolchains/nightly-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/libobject-ec143167d2f06a7a.rlib" "/usr/local/rustup/toolchains/nightly-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/libaddr2line-6670fc24d14cfbae.rlib" "/usr/local/rustup/toolchains/nightly-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/libgimli-a5bd7d016cbbf907.rlib" "/usr/local/rustup/toolchains/nightly-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/librustc_demangle-0e53cf586bc3f84e.rlib" "/usr/local/rustup/toolchains/nightly-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/libhashbrown-767663eb5bb6e2cc.rlib" "/usr/local/rustup/toolchains/nightly-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/librustc_std_workspace_alloc-a263be506260d307.rlib" "/tmp/rustcrMKBfk/libunwind-d00250bbf66b15ed.rlib" "/usr/local/rustup/toolchains/nightly-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/libcfg_if-6b947232594b5e19.rlib" "/tmp/rustcrMKBfk/liblibc-7cff68ab526c92f8.rlib" "/usr/local/rustup/toolchains/nightly-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/liballoc-e7a932949c7be029.rlib" "/usr/local/rustup/toolchains/nightly-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/librustc_std_workspace_core-653a6ce0ae609436.rlib" "/usr/local/rustup/toolchains/nightly-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/libcore-593c9ff67d181fe8.rlib" "-Wl,--end-group" "/usr/local/rustup/toolchains/nightly-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/libcompiler_builtins-e53d70d4ecf78ab8.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lc"
  = note: /usr/lib/gcc/x86_64-alpine-linux-musl/9.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find crti.o: No such file or directory
          collect2: error: ld returned 1 exit status
          

error: aborting due to previous error

error: could not compile `derive-error-chain`.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `diesel_cli v1.4.1`

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

error-chain is removed by #28.

An alpine runtime would be nice to have.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for the diesel_cli tool, not for our code. Alpine would indeed be nice since it's much smaller than Debian

networks:
- zauth-internal

database:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really want to run the database within a docker container? Arguments pro running the database as a system service:

  • (Automatic) system updates, which is better for both for security fixes, as for major upgrades
  • We have more control over the database configuration
  • We could mount the Unix socket in the docker container

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those are convincing arguments. I'll have a chat with @FKD13 about our container architecture and about possibly having a centralized database for all container guests.

Rocket.toml Outdated Show resolved Hide resolved
@redfast00 redfast00 marked this pull request as ready for review August 21, 2020 20:42
@redfast00 redfast00 changed the title [WIP] Add basic docker config Add basic docker config Aug 21, 2020
@rien rien merged commit 7528068 into master Aug 21, 2020
@redfast00 redfast00 deleted the docker-compose branch August 21, 2020 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docker container
2 participants