Link only sh from bash package to reduce image size
This commit is contained in:
parent
ff2b9bbc44
commit
600aa2c8ac
1 changed files with 12 additions and 2 deletions
|
@ -1,10 +1,20 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
let
|
||||||
|
sh = pkgs.stdenv.mkDerivation {
|
||||||
|
name = "sh";
|
||||||
|
phases = [ "installPhase" ];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p "$out"/bin
|
||||||
|
ln -s ${pkgs.bash}/bin/sh "$out"/bin/sh
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in{
|
||||||
config.project.name = "webapp";
|
config.project.name = "webapp";
|
||||||
config.services = {
|
config.services = {
|
||||||
|
|
||||||
webserver = {
|
webserver = {
|
||||||
image.contents = with pkgs; [ bash ];
|
image.contents = [ sh ];
|
||||||
service.useHostStore = true;
|
service.useHostStore = true;
|
||||||
service.command = [ "sh" "-c" ''
|
service.command = [ "sh" "-c" ''
|
||||||
cd "$$WEB_ROOT"
|
cd "$$WEB_ROOT"
|
||||||
|
|
Loading…
Reference in a new issue