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

nix: fix deprecation warning for docker images #4999

Merged
merged 1 commit into from
Mar 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 17 additions & 15 deletions nix/docker/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,23 @@ let
# Layer of tools which aren't going to change much between versions.
baseImage = dockerTools.buildImage {
name = "${repoName}-env";
contents = [
cardano-cli # Provide cardano-cli capability
bashInteractive # Provide the BASH shell
cacert # X.509 certificates of public CA's
coreutils # Basic utilities expected in GNU OS's
curl # CLI tool for transferring files via URLs
glibcLocales # Locale information for the GNU C Library
iana-etc # IANA protocol and port number assignments
iproute # Utilities for controlling TCP/IP networking
iputils # Useful utilities for Linux networking
socat # Utility for bidirectional data transfer
utillinux # System utilities for Linux
];
copyToRoot = pkgs.buildEnv {
name = "image-root";
pathsToLink = ["/"];
paths = [
cardano-cli # Provide cardano-cli capability
bashInteractive # Provide the BASH shell
cacert # X.509 certificates of public CA's
coreutils # Basic utilities expected in GNU OS's
curl # CLI tool for transferring files via URLs
glibcLocales # Locale information for the GNU C Library
iana-etc # IANA protocol and port number assignments
iproute # Utilities for controlling TCP/IP networking
iputils # Useful utilities for Linux networking
socat # Utility for bidirectional data transfer
utillinux # System utilities for Linux
];
};
# set up /tmp (override with TMPDIR variable)
extraCommands = ''
mkdir -m 0777 tmp
Expand Down Expand Up @@ -113,8 +117,6 @@ in
tag = "${gitrev}";
fromImage = baseImage;
created = "now"; # Set creation date to build time. Breaks reproducibility
contents = [
];

# May require system-features = kvm in /etc/nix/nix.conf
# https://discourse.nixos.org/t/cannot-build-docker-image/7445
Expand Down
34 changes: 21 additions & 13 deletions nix/docker/submit-api.nix
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,22 @@ let
# Layer of tools which aren't going to change much between versions.
baseImage = dockerTools.buildImage {
name = "${repoName}-env";
contents = [
bashInteractive # Provide the BASH shell
cacert # X.509 certificates of public CA's
coreutils # Basic utilities expected in GNU OS's
curl # CLI tool for transferring files via URLs
glibcLocales # Locale information for the GNU C Library
iana-etc # IANA protocol and port number assignments
iproute # Utilities for controlling TCP/IP networking
iputils # Useful utilities for Linux networking
socat # Utility for bidirectional data transfer
utillinux # System utilities for Linux
];
copyToRoot = pkgs.buildEnv {
name = "image-root";
pathsToLink = ["/"];
paths = [
bashInteractive # Provide the BASH shell
cacert # X.509 certificates of public CA's
coreutils # Basic utilities expected in GNU OS's
curl # CLI tool for transferring files via URLs
glibcLocales # Locale information for the GNU C Library
iana-etc # IANA protocol and port number assignments
iproute # Utilities for controlling TCP/IP networking
iputils # Useful utilities for Linux networking
socat # Utility for bidirectional data transfer
utillinux # System utilities for Linux
];
};
# set up /tmp (override with TMPDIR variable)
extraCommands = ''
mkdir -m 0777 tmp
Expand Down Expand Up @@ -98,7 +102,11 @@ let
fromImage = baseImage;
tag = "${gitrev}";
created = "now"; # Set creation date to build time. Breaks reproducibility
contents = [ entry-point ];
copyToRoot = pkgs.buildEnv {
name = "image-root";
pathsToLink = ["/"];
paths = [entry-point];
};
config = {
EntryPoint = [ "${entry-point}/bin/entry-point" ];
ExposedPorts = {
Expand Down