diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..4ff89d2 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +.git +.gitignore +.dockerignore +README.md diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..45fcf65 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,27 @@ +FROM ubuntu:22.04 + +RUN apt update && \ + apt -y install \ + apt-transport-https \ + apt-utils \ + bsdmainutils \ + curl \ + dialog \ + grep \ + make \ + man \ + sudo \ + wget + +RUN adduser ivan \ + --quiet \ + --home=/home/ivan \ + --ingroup=sudo \ + --disabled-password \ + --disabled-login + +COPY ./ /home/ivan/my-env +RUN echo "ivan ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers + +USER ivan +WORKDIR /home/ivan/my-env diff --git a/Makefile b/Makefile index 3e60641..c433337 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# Autogenerated at 04.07.2022 22:16 using ./gen-makefile.sh +# Autogenerated at 04.07.2022 23:25 using ./gen-makefile.sh ##lamp: Apache + php + mariadb lamp: apache php mariadb @@ -110,6 +110,6 @@ help: Makefile @echo "Available goals:" @sed -n 's/^##//p' $< | column -t -s ':' | sed -e "s/^/\t/" -##_: Same as 'cat ./install/.sh' +##_: Same as 'cat ./install/' %_: @cat ./install/$* diff --git a/README.md b/README.md index 113895d..d589ac8 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,9 @@ make help ./gen-makefile.sh ``` +> I do not recomend to run `make` without arguments. +> Use `make help` to look around. + ### Selective straightforward installation ```shell @@ -72,3 +75,18 @@ mypackY: goalA goalB where: * `mypack*` is the pack name * `goal*` are script names in `./install` + +## Testing in docker + +```shell +# switch to repo dir +cd my-env + +# build and run container +docker build -t myenv . && docker run -it myenv + +# oneliner +docker run -it $(docker build -q .) +``` + +Now you can play around with scripts.