2023-06-03 03:11:07 -04:00
|
|
|
{
|
|
|
|
|
dockerTools,
|
|
|
|
|
nginx,
|
|
|
|
|
}:
|
2019-03-07 18:03:51 +01:00
|
|
|
dockerTools.buildLayeredImage {
|
|
|
|
|
name = "nginx";
|
2023-06-03 03:11:07 -04:00
|
|
|
contents = [nginx];
|
2019-03-07 18:03:51 +01:00
|
|
|
extraCommands = ''
|
2019-10-06 21:42:19 +02:00
|
|
|
mkdir -p etc
|
2019-03-07 18:03:51 +01:00
|
|
|
chmod u+w etc
|
|
|
|
|
echo "nginx:x:1000:1000::/:" > etc/passwd
|
|
|
|
|
echo "nginx:x:1000:nginx" > etc/group
|
|
|
|
|
'';
|
|
|
|
|
config = {
|
2023-06-03 03:11:07 -04:00
|
|
|
Cmd = ["nginx" "-c" "/etc/nginx/nginx.conf"];
|
2019-03-07 18:03:51 +01:00
|
|
|
ExposedPorts = {
|
2023-06-03 03:11:07 -04:00
|
|
|
"80/tcp" = {};
|
2019-03-07 18:03:51 +01:00
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}
|