Initial docker sandbox
This commit is contained in:
4
.dockerignore
Normal file
4
.dockerignore
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
.git
|
||||||
|
.gitignore
|
||||||
|
.dockerignore
|
||||||
|
README.md
|
||||||
27
Dockerfile
Normal file
27
Dockerfile
Normal 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
|
||||||
4
Makefile
4
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
|
||||||
lamp: apache php mariadb
|
lamp: apache php mariadb
|
||||||
@@ -110,6 +110,6 @@ help: Makefile
|
|||||||
@echo "Available goals:"
|
@echo "Available goals:"
|
||||||
@sed -n 's/^##//p' $< | column -t -s ':' | sed -e "s/^/\t/"
|
@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/$*
|
@cat ./install/$*
|
||||||
|
|||||||
18
README.md
18
README.md
@@ -30,6 +30,9 @@ make help
|
|||||||
./gen-makefile.sh
|
./gen-makefile.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> I do not recomend to run `make` without arguments.
|
||||||
|
> Use `make help` to look around.
|
||||||
|
|
||||||
### Selective straightforward installation
|
### Selective straightforward installation
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
@@ -72,3 +75,18 @@ mypackY: goalA goalB
|
|||||||
where:
|
where:
|
||||||
* `mypack*` is the pack name
|
* `mypack*` is the pack name
|
||||||
* `goal*` are script names in `./install`
|
* `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.
|
||||||
|
|||||||
Reference in New Issue
Block a user