-
Notifications
You must be signed in to change notification settings - Fork 19
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
statamic new
requires tty to run
#65
Comments
Please provide a way for us to reproduce this, or feel free to open a PR. Also, what does |
Below is a docker demo image built with Nix. It can be built using nix build && docker load < result When it's run using the docker run -it -v .:/project statamic-demo-image
docker run -v .:/project statamic-demo-image
The output is
# flake.nix
{
description = "A flake to build a Statamic docker image";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs }: {
packages."x86_64-linux" =
let
pkgs = import nixpkgs { system = "x86_64-linux"; };
in
rec {
default =
pkgs.dockerTools.buildLayeredImage (
let
COMPOSER_HOME = "/tmp/composer";
in
rec {
name = "statamic-demo-image";
tag = "latest";
contents = with pkgs; [
dockerTools.usrBinEnv
dockerTools.binSh
dockerTools.caCertificates
coreutils
gnugrep
git
php81
php81Packages.composer
(writeTextDir "etc/passwd" ''
root:x:0:0::/root:${runtimeShell}
'')
(writeTextDir "root/.ssh/config" ''
Host *
StrictHostKeyChecking no
'')
(writeScriptBin "entrypoint" ''
#!${dockerTools.binSh}/bin/sh
${pkgs.php81Packages.composer}/bin/composer global require statamic/cli
${COMPOSER_HOME}/vendor/bin/statamic new -f -n -- test01
${pkgs.php81Packages.composer}/bin/composer global show | grep prompts
${dockerTools.binSh}/bin/sh
'')
];
config = {
Entrypoint = [ "entrypoint" ];
WorkingDir = "/project";
Env = [
"COMPOSER_HOME=${COMPOSER_HOME}"
"COMPOSER_ALLOW_SUPERUSER=1"
];
Volumes = {
"/project" = { };
};
};
}
);
};
};
} |
I found a way to reproduce this without a docker image, see my PR comment here: #66 (comment) |
I'm trying to create a new statamic site in an automated process using a docker image. It works using the
-it
flags when running the docker image, but without an interactive tty terminal, Statamic fails right after printing the title art:Statamic site generation should not require an interactive shell if the
--no-interaction
flag is passed from the command line.The text was updated successfully, but these errors were encountered: