-
Notifications
You must be signed in to change notification settings - Fork 260
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
Failed to copy container. Digest did not match #1114
Comments
Extra datapoint, I just tried to push the container locally (on linux ARM for linux ARM, as opposed to X64 earlier), and pushing to the GitHub Container Registry (as opposed to ECR earlier), and the error is the same. So I guess that puts the suspicion on non-architecture/registry things. |
It also happens just when running, not just copying: vagrant at vbox@local-vagrantisp in /srv/current/crm on api2/vbox#00000
$ devenv container run processes
• Building processes container ...
• Using Cachix: devenv
warning: Ignoring setting 'auto-allocate-uids' because experimental feature 'auto-allocate-uids' is not enabled
warning: Ignoring setting 'impure-env' because experimental feature 'configurable-impure-env' is not enabled
/nix/store/x2pavkjn8n0c3jqmdiizldyd399i9gdc-image-processes.json
✔ Building processes container in 35.4s.
• Running /nix/store/wr98nrk2xwqln5lgg5qln83zagk15006-copy-container /nix/store/x2pavkjn8n0c3jqmdiizldyd399i9gdc-image-processes.json docker-daemon:
Copying container /nix/store/x2pavkjn8n0c3jqmdiizldyd399i9gdc-image-processes.json to docker-daemon:processes:latest
Getting image source signatures
Copying blob 3e07a34a1ca1 done |
Copying blob 0fb47a54c2cb [=====================================>] 1.6GiB / 1.6GiB | 643.9 MiB/s
FATA[0003] writing blob: writing to temporary on-disk layer: happened during read: Digest did not match, expected sha256:0fb47a54c2cb3ce900976003c42db74ebb24fbf9bfefd458c0a7d2cd5f15a1f3, got sha256:d2e783b2eeb88149765f06c6dff4dfc85b84db7b335484c7d73b519ff748cf2c
✔ Copying processes container in 17.0s.
Error: × Failed to copy container My # - https://shyim.me/blog/devenv-compose-developer-environment-for-php-with-nix/
# - https://github.com/cachix/devenv/blob/main/src/modules/languages/php.nix
{ pkgs, config, lib, ... }:
let
domain = "localhost";
app = "webapi";
dataDir = "/srv/current/crm/webroot";
crmEnv = {
MYSQL_GLOBAL_DBNM = "transloadit";
MYSQL_GLOBAL_HOST = "localhost";
MYSQL_GLOBAL_PORT = "3306";
MYSQL_GLOBAL_USER = "root";
MYSQL_GLOBAL_PASSWORD = "root";
APP_NAME="crm";
};
in {
# https://devenv.sh/basics/
env.GREET = "devenv";
# https://devenv.sh/packages/
packages = [
pkgs.htop
];
# https://devenv.sh/scripts/
scripts.hello.exec = "echo hello from $GREET";
# https://devenv.sh/services/
services.mysql.enable = true;
services.mysql.package = pkgs.mysql80;
services.mysql.initialDatabases = [{ name = crmEnv.MYSQL_GLOBAL_DBNM; }];
services.mysql.ensureUsers = [
{
name = crmEnv.MYSQL_GLOBAL_USER;
password = crmEnv.MYSQL_GLOBAL_PASSWORD;
ensurePermissions = { "${crmEnv.MYSQL_GLOBAL_DBNM}.*" = "ALL PRIVILEGES"; };
}
];
# https://devenv.sh/languages/
languages.typescript.enable = true;
languages.php = {
enable = true;
version = "7.4";
ini = ''
memory_limit = 256M
'';
fpm.pools.${app} = {
settings = {
"pm" = "dynamic";
"pm.max_children" = 5;
"pm.start_servers" = 2;
"pm.min_spare_servers" = 1;
"pm.max_spare_servers" = 5;
"php_admin_value[error_log]" = "stderr";
"php_admin_flag[log_errors]" = true;
"catch_workers_output" = true;
"env[MYSQL_GLOBAL_DBNM]" = crmEnv.MYSQL_GLOBAL_DBNM;
"env[MYSQL_GLOBAL_HOST]" = crmEnv.MYSQL_GLOBAL_HOST;
"env[MYSQL_GLOBAL_PORT]" = crmEnv.MYSQL_GLOBAL_PORT;
"env[MYSQL_GLOBAL_USER]" = crmEnv.MYSQL_GLOBAL_USER;
"env[MYSQL_GLOBAL_PASSWORD]" = crmEnv.MYSQL_GLOBAL_PASSWORD;
"env[APP_NAME]" = crmEnv.APP_NAME;
};
};
};
services.nginx = {
enable = true;
httpConfig = ''
server {
listen 1113;
server_name ${domain};
root ${dataDir};
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include ${pkgs.nginx}/conf/fastcgi_params;
fastcgi_pass unix:${config.languages.php.fpm.pools.${app}.socket};
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
'';
};
} |
There's a similar issue about mismatched digest in the context of devenv reported in nix2container's repo: nlewo/nix2container#127 |
The fix has hit Nix, now we're verifying if it fixes the issue in nlewo/nix2container#127 (comment) |
Does this now work with Nix 2.22.1? |
@domenkozar, bumped nix-daemon from |
Describe the bug
I'm trying to copy my container to AWS ECR from my Linux X64 CI server, but hitting the following issue.
Failed to copy container. Digest did not match
.To reproduce
Output:
Version
devenv 1.0.3 (aarch64-darwin)
devenv 1.0.3 (x86_64-linux)
Not sure what to do next 🤔 any idea?
The text was updated successfully, but these errors were encountered: