Initial docker sandbox

master
Anthony Axenov 2022-07-04 23:25:31 +08:00
parent 7008ec36b7
commit 4677b84a29
Signed by: anthony
GPG Key ID: EA9EC32FF7CCD4EC
4 changed files with 51 additions and 2 deletions

4
.dockerignore 100644
View File

@ -0,0 +1,4 @@
.git
.gitignore
.dockerignore
README.md

27
Dockerfile 100644
View File

@ -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

View File

@ -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/"
##<goal>_: Same as 'cat ./install/<goal>.sh'
##<goal>_: Same as 'cat ./install/<goal>'
%_:
@cat ./install/$*

View File

@ -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.