update,
This commit is contained in:
7
noknok11d/gitUpdate.bat
Normal file
7
noknok11d/gitUpdate.bat
Normal file
@@ -0,0 +1,7 @@
|
||||
git status .
|
||||
|
||||
@pause
|
||||
|
||||
git add .
|
||||
git commit -m"update noknok11d,"
|
||||
start git push
|
1
noknok11d/meta.md
Normal file
1
noknok11d/meta.md
Normal file
@@ -0,0 +1 @@
|
||||
tags: [ ec2 ]
|
BIN
noknok11d/task1-aws-proxy/2023-11-12_15-30.png
(Stored with Git LFS)
Normal file
BIN
noknok11d/task1-aws-proxy/2023-11-12_15-30.png
(Stored with Git LFS)
Normal file
Binary file not shown.
17
noknok11d/task1-aws-proxy/docker-compose.yml
Normal file
17
noknok11d/task1-aws-proxy/docker-compose.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
services:
|
||||
tinyproxy:
|
||||
# Specifies the Docker image to use for the tinyproxy service
|
||||
image: vimagick/tinyproxy
|
||||
|
||||
ports:
|
||||
# Maps port 8888 inside the container to port 5354 on the host
|
||||
- "5354:8888"
|
||||
|
||||
volumes:
|
||||
# Mounts the host directory './data' to '/etc/tinyproxy' inside the container
|
||||
- ./data:/etc/tinyproxy
|
||||
# Mounts the host file 'tinyproxy.conf' to the container's tinyproxy configuration file
|
||||
- ./tinyproxy.conf:/etc/tinyproxy/tinyproxy.conf
|
||||
|
||||
# Ensures the container always restarts unless manually stopped
|
||||
restart: always
|
BIN
noknok11d/task1-aws-proxy/image/2023-11-12_15-01.png
(Stored with Git LFS)
Normal file
BIN
noknok11d/task1-aws-proxy/image/2023-11-12_15-01.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
noknok11d/task1-aws-proxy/image/2023-11-12_15-01_1.png
(Stored with Git LFS)
Normal file
BIN
noknok11d/task1-aws-proxy/image/2023-11-12_15-01_1.png
(Stored with Git LFS)
Normal file
Binary file not shown.
29
noknok11d/task1-aws-proxy/install_docker.sh
Normal file
29
noknok11d/task1-aws-proxy/install_docker.sh
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -x
|
||||
|
||||
sudo apt update
|
||||
|
||||
for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done
|
||||
|
||||
|
||||
# Add Docker's official GPG key:
|
||||
sudo apt-get update
|
||||
sudo apt-get install ca-certificates curl gnupg
|
||||
sudo install -m 0755 -d /etc/apt/keyrings
|
||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
||||
sudo chmod a+r /etc/apt/keyrings/docker.gpg
|
||||
|
||||
# Add the repository to Apt sources:
|
||||
echo \
|
||||
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
|
||||
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
|
||||
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||
sudo apt-get update
|
||||
|
||||
|
||||
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
||||
|
||||
sudo service docker start
|
||||
sudo docker run hello-world
|
||||
|
13
noknok11d/task1-aws-proxy/install_docker_compose.sh
Normal file
13
noknok11d/task1-aws-proxy/install_docker_compose.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
# /usr/bin/env bash
|
||||
|
||||
set -x
|
||||
|
||||
DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
|
||||
mkdir -p $DOCKER_CONFIG/cli-plugins
|
||||
curl -SL https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64 -o $DOCKER_CONFIG/cli-plugins/docker-compose
|
||||
|
||||
chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose
|
||||
|
||||
sudo chmod +x /usr/local/lib/docker/cli-plugins/docker-compose
|
||||
|
||||
docker compose version
|
6
noknok11d/task1-aws-proxy/landing.sh
Normal file
6
noknok11d/task1-aws-proxy/landing.sh
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -x
|
||||
|
||||
sudp apt update
|
||||
sudo apt install -y tmux
|
17
noknok11d/task1-aws-proxy/setup.sh
Normal file
17
noknok11d/task1-aws-proxy/setup.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# 1.
|
||||
./landing.sh
|
||||
|
||||
# 2.
|
||||
./install_docker.sh
|
||||
|
||||
# 3.
|
||||
./install_docker_compose.sh
|
||||
|
||||
# 4.
|
||||
# echo "add user ubuntu to docker group"
|
||||
# sudo vi /etc/group
|
||||
|
||||
# 5.
|
||||
./up.sh
|
4
noknok11d/task1-aws-proxy/tinyproxy.conf
Normal file
4
noknok11d/task1-aws-proxy/tinyproxy.conf
Normal file
@@ -0,0 +1,4 @@
|
||||
# tinyproxy.conf
|
||||
Port 8888
|
||||
Listen 0.0.0.0
|
||||
Timeout 600
|
5
noknok11d/task1-aws-proxy/up.sh
Normal file
5
noknok11d/task1-aws-proxy/up.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
systemctl enable docker
|
||||
|
||||
docker compose up -d
|
Reference in New Issue
Block a user