Beyond
This is the beyond page that an additional post enumeration and assessment are conducted as the root
user after compromising the target system.
Cron & systemd timer
root@mentor:~# crontab -l ; cat /etc/crontab ; systemctl list-timers
no crontab for root
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.
SHELL=/bin/sh
# You can also override PATH, but by default, newer versions inherit it from the environment
#PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user-name command to be executed
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
#
NEXT LEFT LAST PASSED UNIT ACTIVATES >
Thu 2023-12-28 13:29:35 UTC 54min left Thu 2022-11-10 12:38:59 UTC 1 year 1 month ago fwupd-refresh.timer fwupd-refresh.>
Thu 2023-12-28 14:34:57 UTC 1h 59min left Thu 2023-12-28 11:40:23 UTC 54min ago motd-news.timer motd-news.serv>
Thu 2023-12-28 15:39:37 UTC 3h 4min left Thu 2022-11-10 10:25:39 UTC 1 year 1 month ago apt-daily.timer apt-daily.serv>
Thu 2023-12-28 15:50:06 UTC 3h 14min left Thu 2023-12-28 09:23:30 UTC 3h 11min ago ua-timer.timer ua-timer.servi>
Thu 2023-12-28 18:52:26 UTC 6h left Mon 2022-12-05 14:26:43 UTC 1 year 0 months ago man-db.timer man-db.service
Fri 2023-12-29 00:00:00 UTC 11h left n/a n/a dpkg-db-backup.timer dpkg-db-backup>
Fri 2023-12-29 00:00:00 UTC 11h left Thu 2023-12-28 08:56:53 UTC 3h 38min ago logrotate.timer logrotate.serv>
Fri 2023-12-29 06:56:25 UTC 18h left Thu 2023-12-28 08:57:45 UTC 3h 37min ago apt-daily-upgrade.timer apt-daily-upgr>
Fri 2023-12-29 09:01:49 UTC 20h left Thu 2023-12-28 09:01:49 UTC 3h 33min ago update-notifier-download.timer update-notifie>
Fri 2023-12-29 09:11:50 UTC 20h left Thu 2023-12-28 09:11:50 UTC 3h 23min ago systemd-tmpfiles-clean.timer systemd-tmpfil>
Sun 2023-12-31 03:10:52 UTC 2 days left Thu 2023-12-28 08:56:53 UTC 3h 38min ago e2scrub_all.timer e2scrub_all.se>
Mon 2024-01-01 01:11:12 UTC 3 days left Thu 2023-12-28 09:27:51 UTC 3h 7min ago fstrim.timer fstrim.service
Tue 2024-01-02 17:39:19 UTC 5 days left Mon 2022-06-06 19:43:24 UTC 1 year 6 months ago update-notifier-motd.timer update-notifie>
13 timers listed.
Pass --all to see loaded but inactive timers, too.
None
/root/scripts
root@mentor:~/scripts# ll
total 20
drwxr-xr-x 3 root root 4096 Jun 12 2022 ./
drwx------ 7 root root 4096 dec 28 12:35 ../
-rw-r--r-- 1 root root 3211 Jun 7 2022 create_tables.py
drwxr-xr-x 5 root root 4096 Dec 12 2022 docker/
-rwxr-xr-x 1 root root 87 Jun 12 2022 docker-startup.sh*
create_tables.py
root@mentor:~/scripts# cat create_tables.py
import os
import requests
from sqlalchemy import (Column, DateTime, Integer, String, Table, create_engine, MetaData)
from sqlalchemy.sql import func
from databases import Database
DATABASE_URL = os.getenv("DATABASE_URL", "postgresql://postgres:postgres@172.22.0.1/mentorquotes_db")
engine = create_engine(DATABASE_URL)
metadata = MetaData()
quotes = Table(
"quotes",
metadata,
Column("id", Integer, primary_key=True),
Column("title", String(50)),
Column("description", String(2000)),
Column("created_date", DateTime, default=func.now(), nullable=False)
)
metadata.create_all(engine)
h = {'Authorization': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6ImphbWVzIiwiZW1haWwiOiJqYW1lc0BtZW50b3JxdW90ZXMuaHRiIn0.peGpmshcF666bimHkYIBKQN7hj5m785uKcjwbD--Na0', 'accept': 'application/json' }
quotes = [
{
"title": " I believed I was good",
"description": "I was so bad at studies in school. Teachers used to tell me that I should follow a different passion other than typical education. Nonetheless, I got rid of the negativity in myself and others and worked as hard as I could in my finals and college education. Now I am a paid accountant for a major brand in my country."
},
{
"title": "Find your passion before its too late",
"description": "When I was growing up, I did not really have much, sure I enjoyed my passion but did not take it seriously. When I worked in a gas station for 3 years at that point I made a decision to go back to education and get a masters degree. Now I am a senior content engineer for a reputed company"
},
{
"title": "Never too late",
"description": "I was a construction worker for almost 10 years. I had to work there because I did not have any educational background to work in the academic sector. But I realized I was not getting the best of my life. So I started investing in crypto. Learned about how investing is done professionally. Soon enough I was able to give up the construction sector and start my own business. I did all this in my 60s"
},
{
"title": "Age is just a number",
"description": "When I was was kid, I used to create very simple video games as a hobby. Because I loved it so much, I thought to myself that I am going to be a game developer someday. With self-motivation, I applied for a job as a game designer when I just finished school. Now I work there as a permanent video game developer. And I am really proud to be the youngest employee there."
},
{
"title": "Its all worth it in the end",
"description": "Working as a school teacher, I had a lot of responsibilities to fulfill. Even though I really loved teaching kids, the pressure was unbearable. I had 10-hour shifts at school including all the extra classes. But I did all of them to support the kids who needed my help. Now I am retired and I can not think of anything else that I would have done except this. When I see the kids I teach come and visit me telling how they enjoyed my teaching, all the hard work I put in is worth it."
}
]
for quote in quotes:
r = requests.post('http://172.22.0.1:8000/quotes/', headers=h, json=quote)
docker-startup.sh
root@mentor:~/scripts# cat docker-startup.sh
#!/bin/bash
/usr/bin/docker-compose -f /root/scripts/docker/docker-compose.yml up -d
docker/
root@mentor:~/scripts# ll docker
total 24
drwxr-xr-x 5 root root 4096 Dec 12 2022 ./
drwxr-xr-x 3 root root 4096 Jun 12 2022 ../
drwxr-xr-x 3 root root 4096 Dec 11 2022 API/
-rw-r--r-- 1 root root 1149 Dec 12 2022 docker-compose.yml
drwxr-xr-x 3 root root 4096 Nov 11 2022 mentorquotes/
drwxr-xr-x 2 lxd root 4096 Nov 11 2022 postgres/
docker-compose.yml
root@mentor:~/scripts/docker# cat docker-compose.yml
version: "3"
services:
web:
build: ./mentorquotes
ports:
- "172.22.0.1:81:80"
depends_on:
- "api"
volumes:
- ./mentorquotes:/mentorquotes
cap_drop:
- MKNOD
networks:
vpcbr:
ipv4_address: 172.22.0.2
api:
volumes:
- ./api:/API
- /home/svc:/home/svc:ro
build: ./API
ports:
- "172.22.0.1:8000:8000"
depends_on:
- "postgres"
environment:
- ADMIN_USER=james
- ADMIN_EMAIL=james@mentorquotes.htb
- SECRET=76dsf761g31276hjgsdkahuyt123
- WORK_DIR=/app/
cap_drop:
- MKNOD
networks:
vpcbr:
ipv4_address: 172.22.0.3
postgres:
image: postgres:13
ports:
- "172.22.0.1:5432:5432"
user: postgres
volumes:
- ./postgres:/var/lib/postgresql/data/pg_backup
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=mentorquotes_db
networks:
vpcbr:
ipv4_address: 172.22.0.4
networks:
vpcbr:
driver: bridge
ipam:
config:
- subnet: 172.22.0.0/16
gateway: 172.22.0.1
API/
root@mentor:~/scripts/docker# ll API
total 24
drwxr-xr-x 3 root root 4096 Dec 11 2022 ./
drwxr-xr-x 5 root root 4096 Dec 12 2022 ../
drwxr-xr-x 4 root root 4096 Jun 8 2022 app/
-rw-r--r-- 1 root root 520 Jun 12 2022 Dockerfile
-rw-r--r-- 1 root root 1024 Jun 12 2022 .Dockerfile.swp
-rw-r--r-- 1 root root 672 Jun 4 2022 requirements.txt
Same as the one initially found in the Docker container
app/main.py
root@mentor:~/scripts/docker/API# cat app/main.py
from fastapi import FastAPI, Request
from starlette.middleware.cors import CORSMiddleware
from app.api import quotes, admin, users, auth
from app.db import engine, metadata, database
metadata.create_all(engine)
app = FastAPI(
title="MentorQuotes",
description="Working towards helping people move forward",
version="0.0.1",
contact={
"name": "james",
"url": "http://mentorquotes.htb",
"email": "james@mentorquotes.htb",
}
)
origins = [
"http://localhost",
"http://localhost:8080",
"*"
]
app.add_middleware(
CORSMiddleware,
allow_origins=["*"],
allow_credentials=True,
allow_methods=["DELETE", "GET", "POST", "PUT"],
allow_headers=["*"],
)
@app.on_event("startup")
async def startup():
await database.connect()
@app.on_event("shutdown")
async def shutdown():
await database.disconnect()
app.include_router(auth.router, prefix="/auth", tags=['Auth'])
app.include_router(users.router, prefix="/users", tags=['Users'])
app.include_router(quotes.router, prefix="/quotes", tags=["Quotes"])
app.include_router(admin.router,prefix='/admin', tags=['Admin'])
OS Command Injection Vulnerability
root@mentor:~/scripts/docker/API# cat app/api/admin.py
from fastapi import APIRouter, Depends
from app.api.utils import is_admin, is_logged
from app.api.models import backup
import os
router = APIRouter()
WORK_DIR = os.getenv('WORK_DIR', '/app')
DATABASE_URL = os.getenv('DATABASE_URL', 'postgresql://postgres:postgres@192.168.1.4/hello_fastapi_dev')
@router.get('/', dependencies=[Depends(is_logged), Depends(is_admin)],include_in_schema=False)
async def admin_funcs():
return {"admin_funcs":{"check db connection":"/check","backup the application": "/backup"}}
@router.get('/check',dependencies=[Depends(is_logged), Depends(is_admin)],include_in_schema=False)
async def check_connection():
return {"details": "Not implemented yet!"}
# Take a backup of the application
@router.post("/backup",dependencies=[Depends(is_logged), Depends(is_admin)],include_in_schema=False)
async def backup(payload: backup):
os.system(f'tar -c -f {str(payload.path)}/app_backkup.tar {str(WORK_DIR)}')
return {"INFO": "Done!"}
os.system(f'tar -c -f {str(payload.path)}/app_backkup.tar {str(WORK_DIR)}')
mentorquotes/
root@mentor:~/scripts/docker# ll mentorquotes/
total 24
drwxr-xr-x 3 root root 4096 Nov 11 2022 ./
drwxr-xr-x 5 root root 4096 Dec 12 2022 ../
-rw-r--r-- 1 root root 331 Jun 4 2022 Dockerfile
-rw-r--r-- 1 root root 516 Jun 7 2022 main.py
-rw-r--r-- 1 root root 30 Jun 4 2022 requirements.txt
drwxr-xr-x 2 root root 4096 Jun 4 2022 templates/
The personal blog with quotes web application
postgres/
root@mentor:~/scripts/docker# ll postgres/
total 16
drwxr-xr-x 2 lxd root 4096 Nov 11 2022 ./
drwxr-xr-x 5 root root 4096 Dec 12 2022 ../
-rw-r--r-- 1 root root 5543 Nov 11 2022 db_export.sql
db_export.sql
root@mentor:~/scripts/docker/postgres# cat db_export.sql
--
-- PostgreSQL database dump
--
-- Dumped from database version 10.7 (Debian 10.7-1.pgdg90+1)
-- Dumped by pg_dump version 14.3 (Ubuntu 14.3-0ubuntu0.22.04.1)
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;
SET default_tablespace = '';
--
-- name: quotes; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.quotes (
id integer NOT NULL,
title character varying(50),
description character varying(2000),
created_date timestamp without time zone NOT NULL
);
ALTER TABLE public.quotes OWNER TO postgres;
--
-- name: quotes_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.quotes_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.quotes_id_seq OWNER TO postgres;
--
-- name: quotes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.quotes_id_seq OWNED BY public.quotes.id;
--
-- name: users; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.users (
id integer NOT NULL,
email character varying(50),
username character varying(50),
password character varying(128) NOT NULL
);
ALTER TABLE public.users OWNER TO postgres;
--
-- name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.users_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.users_id_seq OWNER TO postgres;
--
-- name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.users_id_seq OWNED BY public.users.id;
--
-- name: quotes id; Type: DEFAULT; Schema: public; Owner: postgres
--
alter table only public.quotes alter column id set default nextval('public.quotes_id_seq'::regclass);
--
-- name: users id; Type: DEFAULT; Schema: public; Owner: postgres
--
alter table only public.users alter column id set default nextval('public.users_id_seq'::regclass);
--
-- data for name: quotes; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.quotes (id, title, description, created_date) FROM stdin;
1 i believed i was good i was so bad at studies in school. teachers used to tell me that i should follow a different passion other than typical education. nonetheless, i got rid of the negativity in myself and others and worked as hard as i could in my finals and college education. now i am a paid accountant for a major brand in my country. 2022-06-07 11:41:23.430806
2 find your passion before its too late when i was growing up, i did not really have much, sure i enjoyed my passion but did not take it seriously. when i worked in a gas station for 3 years at that point i made a decision to go back to education and get a masters degree. now i am a senior content engineer for a reputed company 2022-06-07 11:41:23.449076
3 never too late i was a construction worker for almost 10 years. i had to work there because i did not have any educational background to work in the academic sector. but i realized i was not getting the best of my life. so i started investing in crypto. learned about how investing is done professionally. soon enough i was able to give up the construction sector and start my own business. i did all this in my 60s 2022-06-07 11:41:23.464524
4 age is just a number when i was was kid, i used to create very simple video games as a hobby. because i loved it so much, i thought to myself that i am going to be a game developer someday. with self-motivation, i applied for a job as a game designer when i just finished school. now i work there as a permanent video game developer. and i am really proud to be the youngest employee there. 2022-06-07 11:41:23.478641
5 its all worth it in the end working as a school teacher, i had a lot of responsibilities to fulfill. even though i really loved teaching kids, the pressure was unbearable. i had 10-hour shifts at school including all the extra classes. but i did all of them to support the kids who needed my help. now i am retired and i can not think of anything else that i would have done except this. when i see the kids i teach come and visit me telling how they enjoyed my teaching, all the hard work i put in is worth it. 2022-06-07 11:41:23.492137
\.
--
-- data for name: users; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.users (id, email, username, password) FROM stdin;
1 james@mentorquotes.htb james 7ccdcd8c05b59add9c198d492b36a503
35 svc@mentorquotes.htb service_acc 53f22d0dfa10dce7e29cd31f4f953fd8
\.
--
-- name: quotes_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('public.quotes_id_seq', 81, true);
--
-- name: users_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('public.users_id_seq', 35, true);
--
-- name: quotes quotes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.quotes
ADD CONSTRAINT quotes_pkey PRIMARY KEY (id);
--
-- name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.users
ADD CONSTRAINT users_pkey PRIMARY KEY (id);
--
-- PostgreSQL database dump complete
--
Used for initializing and instantiating the backend PostgreSQL
Docker
root@mentor:~/scripts/docker# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
457d4bd70def docker_web "python main.py" 4 hours ago Up 4 hours 172.22.0.1:81->80/tcp docker_web_1
a05537a193df docker_api "python3 -m uvicorn …" 4 hours ago Up 4 hours 172.22.0.1:8000->8000/tcp docker_api_1
68eae44d369c 77949e00ae81 "/bin/sh -c 'python …" 18 months ago Created modest_goodall
b666a1f9da43 ce695e418324 "/bin/sh -c 'pip3 pi…" 18 months ago Exited (1) 18 months ago nervous_poincare
5bd8a306a00d 8413a12d40f0 "/bin/sh -c 'pip3 pi…" 18 months ago Created agitated_yalow
96e44c569292 postgres:13 "docker-entrypoint.s…" 18 months ago Up 4 hours 172.22.0.1:5432->5432/tcp docker_postgres_1
3 Docker containers
docker_web_1
root@mentor:~/scripts/docker# docker container inspect docker_web_1
[
{
"id": "457d4bd70deff2a68b4fd268e6fc8bef760c0be2d5ffa6cdd5440386ab5e8277",
"created": "2023-12-28T08:57:02.304667594Z",
"path": "python",
"args": [
"main.py"
],
"state": {
"status": "running",
"running": true,
"paused": false,
"restarting": false,
"oomkilled": false,
"dead": false,
"pid": 2030,
"exitcode": 0,
"error": "",
"startedat": "2023-12-28T08:57:03.167188843Z",
"finishedat": "0001-01-01T00:00:00Z"
},
"image": "sha256:5be0655e5f1aaf2d4c2c8757648ec1dcb786d47ff05249e626e7f25ff16f1f15",
"resolvconfpath": "/var/lib/docker/containers/457d4bd70deff2a68b4fd268e6fc8bef760c0be2d5ffa6cdd5440386ab5e8277/resolv.conf",
"hostnamepath": "/var/lib/docker/containers/457d4bd70deff2a68b4fd268e6fc8bef760c0be2d5ffa6cdd5440386ab5e8277/hostname",
"hostspath": "/var/lib/docker/containers/457d4bd70deff2a68b4fd268e6fc8bef760c0be2d5ffa6cdd5440386ab5e8277/hosts",
"logpath": "/var/lib/docker/containers/457d4bd70deff2a68b4fd268e6fc8bef760c0be2d5ffa6cdd5440386ab5e8277/457d4bd70deff2a68b4fd268e6fc8bef760c0be2d5ffa6cdd5440386ab5e8277-json.log",
"name": "/docker_web_1",
"restartcount": 0,
"driver": "overlay2",
"platform": "linux",
"mountlabel": "",
"processlabel": "",
"apparmorprofile": "docker-default",
"execids": null,
"hostconfig": {
"binds": [
"/root/scripts/docker/mentorquotes:/mentorquotes:rw"
],
"containeridfile": "",
"logconfig": {
"type": "json-file",
"config": {}
},
"networkmode": "docker_vpcbr",
"portbindings": {
"80/tcp": [
{
"hostip": "172.22.0.1",
"hostport": "81"
}
]
},
"restartpolicy": {
"name": "",
"maximumretrycount": 0
},
"autoremove": false,
"volumedriver": "",
"volumesfrom": [],
"capadd": null,
"capdrop": [
"MKNOD"
],
"cgroupnsmode": "private",
"dns": null,
"dnsoptions": null,
"dnssearch": null,
"extrahosts": null,
"groupadd": null,
"ipcmode": "private",
"cgroup": "",
"links": null,
"oomscoreadj": 0,
"pidmode": "",
"privileged": false,
"publishallports": false,
"readonlyrootfs": false,
"securityopt": null,
"utsmode": "",
"usernsmode": "",
"shmsize": 67108864,
"runtime": "runc",
"consolesize": [
0,
0
],
"isolation": "",
"cpushares": 0,
"memory": 0,
"nanocpus": 0,
"cgroupparent": "",
"blkioweight": 0,
"blkioweightdevice": null,
"blkiodevicereadbps": null,
"blkiodevicewritebps": null,
"blkiodevicereadiops": null,
"blkiodevicewriteiops": null,
"cpuperiod": 0,
"cpuquota": 0,
"cpurealtimeperiod": 0,
"cpurealtimeruntime": 0,
"cpusetcpus": "",
"cpusetmems": "",
"devices": null,
"devicecgrouprules": null,
"devicerequests": null,
"kernelmemory": 0,
"kernelmemorytcp": 0,
"memoryreservation": 0,
"memoryswap": 0,
"memoryswappiness": null,
"oomkilldisable": null,
"pidslimit": null,
"ulimits": null,
"cpucount": 0,
"cpupercent": 0,
"iomaximumiops": 0,
"iomaximumbandwidth": 0,
"maskedpaths": [
"/proc/asound",
"/proc/acpi",
"/proc/kcore",
"/proc/keys",
"/proc/latency_stats",
"/proc/timer_list",
"/proc/timer_stats",
"/proc/sched_debug",
"/proc/scsi",
"/sys/firmware"
],
"readonlypaths": [
"/proc/bus",
"/proc/fs",
"/proc/irq",
"/proc/sys",
"/proc/sysrq-trigger"
]
},
"graphdriver": {
"data": {
"lowerdir": "/var/lib/docker/overlay2/1e057b036939c227e20dd193af17ea32b24d332161b57160ae8d716f0db560e8-init/diff:/var/lib/docker/overlay2/99373d459ae8573915b753bcd9a44b3a7ff22b83b2156e97489685030637cdae/diff:/var/lib/docker/overlay2/aa8d1ec3849103beb768c72ce60ce6db3345909be6415c927708b0942796e26b/diff:/var/lib/docker/overlay2/d6f7c36224d59dee4d799f143b454ac82da22074873c06d4bfb62739b029ba0a/diff:/var/lib/docker/overlay2/36e61eb0b2dca2cd6d50f021353cb4a94b8338a9005c3655e97a71a9e36ac4d7/diff:/var/lib/docker/overlay2/a97035dcc8386b95f75500ecf0966fb8b37a0dd47e2cde63e44aa88fce67893f/diff:/var/lib/docker/overlay2/ca07eccd8d687ba209fd9368d55aad4e946df1ffdcaa10e69a05f67f27a2b812/diff:/var/lib/docker/overlay2/81fc271c9b60b6438ebe507e4cfb5073e45a40afce8660c5c9541a54c7d2ede9/diff:/var/lib/docker/overlay2/7e9e2d14aa59c2319088ad4a5d8aae4b5643c52c7f9a973eeea0f3ab76a7e016/diff:/var/lib/docker/overlay2/dc4b5d72c5c508b3d999cb1ef255d78a20038a984dcb3d538c01c29142a1ee49/diff:/var/lib/docker/overlay2/f86ac2c910a6fbfea6e570d3b5e67499972833d197b46200d67fb9dacef56781/diff:/var/lib/docker/overlay2/d23a559abae3ab700afd698d8cd3ab66c5c499fdf8a056af1442e6564bc2d81a/diff:/var/lib/docker/overlay2/d5812d9fb80618f2cf8f5324d6ab1dd697aa9b6335944df51506ba01f18c78c2/diff",
"mergeddir": "/var/lib/docker/overlay2/1e057b036939c227e20dd193af17ea32b24d332161b57160ae8d716f0db560e8/merged",
"upperdir": "/var/lib/docker/overlay2/1e057b036939c227e20dd193af17ea32b24d332161b57160ae8d716f0db560e8/diff",
"workdir": "/var/lib/docker/overlay2/1e057b036939c227e20dd193af17ea32b24d332161b57160ae8d716f0db560e8/work"
},
"name": "overlay2"
},
"mounts": [
{
"type": "bind",
"source": "/root/scripts/docker/mentorquotes",
"destination": "/mentorquotes",
"mode": "rw",
"rw": true,
"propagation": "rprivate"
}
],
"config": {
"hostname": "457d4bd70def",
"domainname": "",
"user": "",
"attachstdin": false,
"attachstdout": false,
"attachstderr": false,
"exposedports": {
"80/tcp": {}
},
"tty": false,
"openstdin": false,
"stdinonce": false,
"env": [
"path=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"LANG=C.UTF-8",
"GPG_KEY=0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D",
"PYTHON_VERSION=3.6.9",
"PYTHON_PIP_VERSION=19.3.1",
"python_get_pip_url=https://github.com/pypa/get-pip/raw/ffe826207a010164265d9cc807978e3604d18ca0/get-pip.py",
"PYTHON_GET_PIP_SHA256=b86f36cc4345ae87bfd4f10ef6b2dbfa7a872fbff70608a1e43944d283fd0eee"
],
"cmd": [
"python",
"main.py"
],
"image": "docker_web",
"volumes": {
"/mentorquotes": {}
},
"workingdir": "/mentorquotes",
"entrypoint": null,
"onbuild": null,
"labels": {
"com.docker.compose.config-hash": "f3eb4855c67915e4bbaea4d3f95e5532adbcfe96b9335581d70ead2aef6307a1",
"com.docker.compose.container-number": "1",
"com.docker.compose.oneoff": "False",
"com.docker.compose.project": "docker",
"com.docker.compose.project.config_files": "/root/scripts/docker/docker-compose.yml",
"com.docker.compose.project.working_dir": "/root/scripts/docker",
"com.docker.compose.service": "web",
"com.docker.compose.version": "1.29.2"
}
},
"networksettings": {
"bridge": "",
"sandboxid": "abc4a54dbf4d9da344082e9364d41a3a600a2354484249ec71a500b4020637b7",
"hairpinmode": false,
"linklocalipv6address": "",
"linklocalipv6prefixlen": 0,
"ports": {
"80/tcp": [
{
"hostip": "172.22.0.1",
"hostport": "81"
}
]
},
"sandboxkey": "/var/run/docker/netns/abc4a54dbf4d",
"secondaryipaddresses": null,
"secondaryipv6addresses": null,
"endpointid": "",
"gateway": "",
"globalipv6address": "",
"globalipv6prefixlen": 0,
"ipaddress": "",
"ipprefixlen": 0,
"ipv6gateway": "",
"macaddress": "",
"networks": {
"docker_vpcbr": {
"ipamconfig": {
"ipv4address": "172.22.0.2"
},
"links": null,
"aliases": [
"457d4bd70def",
"web"
],
"networkid": "7d5c72654da746195e9f21ace8e63d258116f2fdf877b10c29258fff78ee3176",
"endpointid": "6bad01987ed504e0b7eb4dd24420f0e55f7bc707ea6ffa7c7f26b326538f1fce",
"gateway": "172.22.0.1",
"ipaddress": "172.22.0.2",
"ipprefixlen": 16,
"ipv6gateway": "",
"globalipv6address": "",
"globalipv6prefixlen": 0,
"macaddress": "02:42:ac:16:00:02",
"driveropts": null
}
}
}
}
]
docker_api_1
root@mentor:~/scripts/docker# docker container inspect docker_api_1
[
{
"Id": "a05537a193df0c30ebc3892f92e3884d9ba9241e8e168fdd755731acb63fa813",
"Created": "2023-12-28T08:57:01.504508736Z",
"Path": "python3",
"Args": [
"-m",
"uvicorn",
"app.main:app",
"--reload",
"--workers",
"2",
"--host",
"0.0.0.0",
"--port",
"8000"
],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 1921,
"ExitCode": 0,
"Error": "",
"StartedAt": "2023-12-28T08:57:02.241315516Z",
"FinishedAt": "0001-01-01T00:00:00Z"
},
"Image": "sha256:3a66989c3c04470c49e2bc094529f6c1307b5a3d61477ae533ce51408c42dfbb",
"ResolvConfPath": "/var/lib/docker/containers/a05537a193df0c30ebc3892f92e3884d9ba9241e8e168fdd755731acb63fa813/resolv.conf",
"HostnamePath": "/var/lib/docker/containers/a05537a193df0c30ebc3892f92e3884d9ba9241e8e168fdd755731acb63fa813/hostname",
"HostsPath": "/var/lib/docker/containers/a05537a193df0c30ebc3892f92e3884d9ba9241e8e168fdd755731acb63fa813/hosts",
"LogPath": "/var/lib/docker/containers/a05537a193df0c30ebc3892f92e3884d9ba9241e8e168fdd755731acb63fa813/a05537a193df0c30ebc3892f92e3884d9ba9241e8e168fdd755731acb63fa813-json.log",
"Name": "/docker_api_1",
"RestartCount": 0,
"Driver": "overlay2",
"Platform": "linux",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "docker-default",
"ExecIDs": null,
"HostConfig": {
"Binds": [
"/home/svc:/home/svc:ro",
"/root/scripts/docker/API:/API:rw"
],
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {}
},
"NetworkMode": "docker_vpcbr",
"PortBindings": {
"8000/tcp": [
{
"HostIp": "172.22.0.1",
"HostPort": "8000"
}
]
},
"RestartPolicy": {
"Name": "",
"MaximumRetryCount": 0
},
"AutoRemove": false,
"VolumeDriver": "",
"VolumesFrom": [],
"CapAdd": null,
"CapDrop": [
"MKNOD"
],
"CgroupnsMode": "private",
"Dns": null,
"DnsOptions": null,
"DnsSearch": null,
"ExtraHosts": null,
"GroupAdd": null,
"IpcMode": "private",
"Cgroup": "",
"Links": null,
"OomScoreAdj": 0,
"PidMode": "",
"Privileged": false,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"SecurityOpt": null,
"UTSMode": "",
"UsernsMode": "",
"ShmSize": 67108864,
"Runtime": "runc",
"ConsoleSize": [
0,
0
],
"Isolation": "",
"CpuShares": 0,
"Memory": 0,
"NanoCpus": 0,
"CgroupParent": "",
"BlkioWeight": 0,
"BlkioWeightDevice": null,
"BlkioDeviceReadBps": null,
"BlkioDeviceWriteBps": null,
"BlkioDeviceReadIOps": null,
"BlkioDeviceWriteIOps": null,
"CpuPeriod": 0,
"CpuQuota": 0,
"CpuRealtimePeriod": 0,
"CpuRealtimeRuntime": 0,
"CpusetCpus": "",
"CpusetMems": "",
"Devices": null,
"DeviceCgroupRules": null,
"DeviceRequests": null,
"KernelMemory": 0,
"KernelMemoryTCP": 0,
"MemoryReservation": 0,
"MemorySwap": 0,
"MemorySwappiness": null,
"OomKillDisable": null,
"PidsLimit": null,
"Ulimits": null,
"CpuCount": 0,
"CpuPercent": 0,
"IOMaximumIOps": 0,
"IOMaximumBandwidth": 0,
"MaskedPaths": [
"/proc/asound",
"/proc/acpi",
"/proc/kcore",
"/proc/keys",
"/proc/latency_stats",
"/proc/timer_list",
"/proc/timer_stats",
"/proc/sched_debug",
"/proc/scsi",
"/sys/firmware"
],
"ReadonlyPaths": [
"/proc/bus",
"/proc/fs",
"/proc/irq",
"/proc/sys",
"/proc/sysrq-trigger"
]
},
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/12d06d1ae38f90a69cd5e4c92bad21712b6bc021c59a01a90c5f8526162c86e2-init/diff:/var/lib/docker/overlay2/f0542da48f54b16fae0c7f6c8621363253c9a69eb3135b7c401b9c0f62b93651/diff:/var/lib/docker/overlay2/bf336a979df4cc17cbe9261f75d3c2b27cf172e044b83f0fccbdeea1f4edfb40/diff:/var/lib/docker/overlay2/ce244d0c1be424c633dd2c3322c58abce99be0af3ce0a3a8cdfd8367c2f04744/diff:/var/lib/docker/overlay2/c57d68f12e9d1775cd199bbfd563328389f53f10fb8a2fa2a2473e8f55b2be32/diff:/var/lib/docker/overlay2/73d4a7086d1f117bd0dc6ad5562bd5be8d7d123d85452746b3ca0afc025f6b55/diff:/var/lib/docker/overlay2/feead8723b4a3ae5ce1dcf71a92791d4022c58753c5dd39f3c1c7fc520614815/diff:/var/lib/docker/overlay2/0d2e5bc010a0448a7c898cba823f20499da105aa682789b1936f87bc3e2e1493/diff:/var/lib/docker/overlay2/433cd1e5e25486efaa10efe79050231941baac3611cc689536ab56b015e3da8f/diff:/var/lib/docker/overlay2/31a6893973a86c7d491633efde2ba7ef964754e477528d5077b466c3dd885c08/diff:/var/lib/docker/overlay2/46ad4e2465c90e65d6c6b2172c7ad6e42ba5b49c2f9eed7fe12560e13ac5ebbe/diff:/var/lib/docker/overlay2/c9c9f6bba5064473d022ac457b16f48ad5c24ea03414111fd465741dc242fcb7/diff:/var/lib/docker/overlay2/7e9e2d14aa59c2319088ad4a5d8aae4b5643c52c7f9a973eeea0f3ab76a7e016/diff:/var/lib/docker/overlay2/dc4b5d72c5c508b3d999cb1ef255d78a20038a984dcb3d538c01c29142a1ee49/diff:/var/lib/docker/overlay2/f86ac2c910a6fbfea6e570d3b5e67499972833d197b46200d67fb9dacef56781/diff:/var/lib/docker/overlay2/d23a559abae3ab700afd698d8cd3ab66c5c499fdf8a056af1442e6564bc2d81a/diff:/var/lib/docker/overlay2/d5812d9fb80618f2cf8f5324d6ab1dd697aa9b6335944df51506ba01f18c78c2/diff",
"MergedDir": "/var/lib/docker/overlay2/12d06d1ae38f90a69cd5e4c92bad21712b6bc021c59a01a90c5f8526162c86e2/merged",
"UpperDir": "/var/lib/docker/overlay2/12d06d1ae38f90a69cd5e4c92bad21712b6bc021c59a01a90c5f8526162c86e2/diff",
"WorkDir": "/var/lib/docker/overlay2/12d06d1ae38f90a69cd5e4c92bad21712b6bc021c59a01a90c5f8526162c86e2/work"
},
"Name": "overlay2"
},
"Mounts": [
{
"Type": "bind",
"Source": "/home/svc",
"Destination": "/home/svc",
"Mode": "ro",
"RW": false,
"Propagation": "rprivate"
},
{
"Type": "bind",
"Source": "/root/scripts/docker/API",
"Destination": "/API",
"Mode": "rw",
"RW": true,
"Propagation": "rprivate"
}
],
"Config": {
"Hostname": "a05537a193df",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"8000/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"ADMIN_USER=james",
"ADMIN_EMAIL=james@mentorquotes.htb",
"SECRET=76dsf761g31276hjgsdkahuyt123",
"WORK_DIR=/app/",
"PATH=/home/svc/.local/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"LANG=C.UTF-8",
"GPG_KEY=0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D",
"PYTHON_VERSION=3.6.9",
"PYTHON_PIP_VERSION=19.3.1",
"PYTHON_GET_PIP_URL=https://github.com/pypa/get-pip/raw/ffe826207a010164265d9cc807978e3604d18ca0/get-pip.py",
"PYTHON_GET_PIP_SHA256=b86f36cc4345ae87bfd4f10ef6b2dbfa7a872fbff70608a1e43944d283fd0eee",
"HOME=/home/svc"
],
"Cmd": [
"python3",
"-m",
"uvicorn",
"app.main:app",
"--reload",
"--workers",
"2",
"--host",
"0.0.0.0",
"--port",
"8000"
],
"Image": "docker_api",
"Volumes": {
"/API": {},
"/home/svc": {}
},
"WorkingDir": "/app",
"Entrypoint": null,
"OnBuild": null,
"Labels": {
"com.docker.compose.config-hash": "00042892e97cce31575a90645fedc3e6025d4008ef77aabef04ed5afefb6cc4c",
"com.docker.compose.container-number": "1",
"com.docker.compose.oneoff": "False",
"com.docker.compose.project": "docker",
"com.docker.compose.project.config_files": "/root/scripts/docker/docker-compose.yml",
"com.docker.compose.project.working_dir": "/root/scripts/docker",
"com.docker.compose.service": "api",
"com.docker.compose.version": "1.29.2"
}
},
"NetworkSettings": {
"Bridge": "",
"SandboxID": "7797ff8dcfe94b5d029d27b7b848a6fd5e9303dbc2ecdaefbc990a1510d0f76d",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {
"8000/tcp": [
{
"HostIp": "172.22.0.1",
"HostPort": "8000"
}
]
},
"SandboxKey": "/var/run/docker/netns/7797ff8dcfe9",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "",
"Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "",
"IPPrefixLen": 0,
"IPv6Gateway": "",
"MacAddress": "",
"Networks": {
"docker_vpcbr": {
"IPAMConfig": {
"IPv4Address": "172.22.0.3"
},
"Links": null,
"Aliases": [
"a05537a193df",
"api"
],
"NetworkID": "7d5c72654da746195e9f21ace8e63d258116f2fdf877b10c29258fff78ee3176",
"EndpointID": "43df9a01ab5280d1cd7dc7be259b88fe597462da8e9c82155c9261500d485f27",
"Gateway": "172.22.0.1",
"IPAddress": "172.22.0.3",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "02:42:ac:16:00:03",
"DriverOpts": null
}
}
}
}
]
docker_postgres_1
root@mentor:~/scripts/docker# docker container inspect docker_postgres_1
[
{
"id": "96e44c5692920491cdb954f3d352b3532a88425979cd48b3959b63bfec98a6f4",
"created": "2022-06-08T17:40:39.686553735Z",
"path": "docker-entrypoint.sh",
"args": [
"postgres"
],
"state": {
"status": "running",
"running": true,
"paused": false,
"restarting": false,
"oomkilled": false,
"dead": false,
"pid": 1796,
"exitcode": 0,
"error": "",
"startedat": "2023-12-28T08:57:01.465535761Z",
"finishedat": "2022-12-12T10:25:38.77181005Z"
},
"image": "sha256:bb3dc2277987facd2b87f470052aab8f2d711de7d6d1c3476e452ddc1b307b94",
"resolvconfpath": "/var/lib/docker/containers/96e44c5692920491cdb954f3d352b3532a88425979cd48b3959b63bfec98a6f4/resolv.conf",
"hostnamepath": "/var/lib/docker/containers/96e44c5692920491cdb954f3d352b3532a88425979cd48b3959b63bfec98a6f4/hostname",
"hostspath": "/var/lib/docker/containers/96e44c5692920491cdb954f3d352b3532a88425979cd48b3959b63bfec98a6f4/hosts",
"logpath": "/var/lib/docker/containers/96e44c5692920491cdb954f3d352b3532a88425979cd48b3959b63bfec98a6f4/96e44c5692920491cdb954f3d352b3532a88425979cd48b3959b63bfec98a6f4-json.log",
"name": "/docker_postgres_1",
"restartcount": 0,
"driver": "overlay2",
"platform": "linux",
"mountlabel": "",
"processlabel": "",
"apparmorprofile": "docker-default",
"execids": null,
"hostconfig": {
"binds": [
"/root/scripts/docker/postgres:/var/lib/postgresql/data/pg_backup:rw",
"8c14482671c3b5995e11cc288a77be8b10d7a02315563feee22f2c40b4a6c037:/var/lib/postgresql/data:rw"
],
"containeridfile": "",
"logconfig": {
"type": "json-file",
"config": {}
},
"networkmode": "docker_vpcbr",
"portbindings": {
"5432/tcp": [
{
"hostip": "172.22.0.1",
"hostport": "5432"
}
]
},
"restartpolicy": {
"name": "",
"maximumretrycount": 0
},
"autoremove": false,
"volumedriver": "",
"volumesfrom": [],
"capadd": null,
"capdrop": null,
"cgroupnsmode": "private",
"dns": [],
"dnsoptions": [],
"dnssearch": [],
"extrahosts": null,
"groupadd": null,
"ipcmode": "private",
"cgroup": "",
"links": null,
"oomscoreadj": 0,
"pidmode": "",
"privileged": false,
"publishallports": false,
"readonlyrootfs": false,
"securityopt": null,
"utsmode": "",
"usernsmode": "",
"shmsize": 67108864,
"runtime": "runc",
"consolesize": [
0,
0
],
"isolation": "",
"cpushares": 0,
"memory": 0,
"nanocpus": 0,
"cgroupparent": "",
"blkioweight": 0,
"blkioweightdevice": null,
"blkiodevicereadbps": null,
"blkiodevicewritebps": null,
"blkiodevicereadiops": null,
"blkiodevicewriteiops": null,
"cpuperiod": 0,
"cpuquota": 0,
"cpurealtimeperiod": 0,
"cpurealtimeruntime": 0,
"cpusetcpus": "",
"cpusetmems": "",
"devices": null,
"devicecgrouprules": null,
"devicerequests": null,
"kernelmemory": 0,
"kernelmemorytcp": 0,
"memoryreservation": 0,
"memoryswap": 0,
"memoryswappiness": null,
"oomkilldisable": null,
"pidslimit": null,
"ulimits": null,
"cpucount": 0,
"cpupercent": 0,
"iomaximumiops": 0,
"iomaximumbandwidth": 0,
"maskedpaths": [
"/proc/asound",
"/proc/acpi",
"/proc/kcore",
"/proc/keys",
"/proc/latency_stats",
"/proc/timer_list",
"/proc/timer_stats",
"/proc/sched_debug",
"/proc/scsi",
"/sys/firmware"
],
"readonlypaths": [
"/proc/bus",
"/proc/fs",
"/proc/irq",
"/proc/sys",
"/proc/sysrq-trigger"
]
},
"graphdriver": {
"data": {
"lowerdir": "/var/lib/docker/overlay2/59fb5c0b16570e06fb16c053b1b62108a4b0f620e9e5ee51e3e3f1d772896a7f-init/diff:/var/lib/docker/overlay2/d48bb4b3fa87502252e8f3d5de2c984c02eb7075ed8be169b200348959717c79/diff:/var/lib/docker/overlay2/41c729db76d768d38f749a2b38272e4e584cc4d144452d3d0affc89573ab2c20/diff:/var/lib/docker/overlay2/6e2fe9d5521c7fc73760d1b604ba1692b9856647bfe4df49a368e2dd2520742c/diff:/var/lib/docker/overlay2/624b44b32a808bcccc1748a4bf23eacfad436f7d14b5da072a0c2b9ce99b8c14/diff:/var/lib/docker/overlay2/e4d9a31643895f7253f49aa7901699563f3077e451cc3587e08ec992cee7bd0b/diff:/var/lib/docker/overlay2/e615707844babf8b6157c482010ce223862d671300d4b3ec179c2193328aa1f5/diff:/var/lib/docker/overlay2/e421433891ed21ecf5b4e62fd51b15ef22fad989dc28c0f320ec16e8453b69d2/diff:/var/lib/docker/overlay2/5fd80ed96b689fff0fc8ddefbf96a9afcd175915aabb3f2112475d8adefcc625/diff:/var/lib/docker/overlay2/a8534041bf2edd40ef44c52d22974293bd106c9c2eb3df9ef8a25af7048a7671/diff:/var/lib/docker/overlay2/a16657495841fb9ea1665e5e1e5ba8c10c57cd5921cc17c271759e8fc5e24da0/diff:/var/lib/docker/overlay2/cea55fc99b3b502d2a15dc71433892030d40865a49f8b887f214cec26090a462/diff:/var/lib/docker/overlay2/e7fc17b2802ecf348e8a7d83dfc5e525cf16ed5ddd172ba65a1ed555f8fd0ea3/diff:/var/lib/docker/overlay2/00a4ab6b192583204781b19153048a75f40474e54074943282fdc2d602829cf8/diff",
"mergeddir": "/var/lib/docker/overlay2/59fb5c0b16570e06fb16c053b1b62108a4b0f620e9e5ee51e3e3f1d772896a7f/merged",
"upperdir": "/var/lib/docker/overlay2/59fb5c0b16570e06fb16c053b1b62108a4b0f620e9e5ee51e3e3f1d772896a7f/diff",
"workdir": "/var/lib/docker/overlay2/59fb5c0b16570e06fb16c053b1b62108a4b0f620e9e5ee51e3e3f1d772896a7f/work"
},
"name": "overlay2"
},
"mounts": [
{
"type": "volume",
"name": "8c14482671c3b5995e11cc288a77be8b10d7a02315563feee22f2c40b4a6c037",
"source": "/var/lib/docker/volumes/8c14482671c3b5995e11cc288a77be8b10d7a02315563feee22f2c40b4a6c037/_data",
"destination": "/var/lib/postgresql/data",
"driver": "local",
"mode": "rw",
"rw": true,
"propagation": ""
},
{
"type": "bind",
"source": "/root/scripts/docker/postgres",
"destination": "/var/lib/postgresql/data/pg_backup",
"mode": "rw",
"rw": true,
"propagation": "rprivate"
}
],
"config": {
"hostname": "96e44c569292",
"domainname": "",
"user": "postgres",
"attachstdin": false,
"attachstdout": false,
"attachstderr": false,
"exposedports": {
"5432/tcp": {}
},
"tty": false,
"openstdin": false,
"stdinonce": false,
"env": [
"POSTGRES_USER=postgres",
"POSTGRES_PASSWORD=postgres",
"POSTGRES_DB=mentorquotes_db",
"affinity:container==f5c919c4999e79af71661b551c35446f609e50938015a64113a9d84582d2f537",
"path=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/postgresql/13/bin",
"GOSU_VERSION=1.14",
"LANG=en_US.utf8",
"PG_MAJOR=13",
"PG_VERSION=13.7-1.pgdg110+1",
"PGDATA=/var/lib/postgresql/data"
],
"cmd": [
"postgres"
],
"image": "postgres:13",
"volumes": {
"/var/lib/postgresql/data": {},
"/var/lib/postgresql/data/pg_backup": {}
},
"workingdir": "",
"entrypoint": [
"docker-entrypoint.sh"
],
"onbuild": null,
"labels": {
"com.docker.compose.config-hash": "99f457ec84354318e5b26a46eeb41045d2d3c6dc2a572823ebbb710a5d519861",
"com.docker.compose.container-number": "1",
"com.docker.compose.oneoff": "False",
"com.docker.compose.project": "docker",
"com.docker.compose.project.config_files": "/root/scripts/docker/docker-compose.yml",
"com.docker.compose.project.working_dir": "/root/scripts/docker",
"com.docker.compose.service": "postgres",
"com.docker.compose.version": "1.29.2"
},
"stopsignal": "SIGINT"
},
"networksettings": {
"bridge": "",
"sandboxid": "9a339161ea8b6c3e14e7c7942683a169154a972a09871f482a0800a5b6d253dd",
"hairpinmode": false,
"linklocalipv6address": "",
"linklocalipv6prefixlen": 0,
"ports": {
"5432/tcp": [
{
"hostip": "172.22.0.1",
"hostport": "5432"
}
]
},
"sandboxkey": "/var/run/docker/netns/9a339161ea8b",
"secondaryipaddresses": null,
"secondaryipv6addresses": null,
"endpointid": "",
"gateway": "",
"globalipv6address": "",
"globalipv6prefixlen": 0,
"ipaddress": "",
"ipprefixlen": 0,
"ipv6gateway": "",
"macaddress": "",
"networks": {
"docker_vpcbr": {
"ipamconfig": {
"ipv4address": "172.22.0.4"
},
"links": null,
"aliases": [
"96e44c569292",
"postgres"
],
"networkid": "7d5c72654da746195e9f21ace8e63d258116f2fdf877b10c29258fff78ee3176",
"endpointid": "cab8cf0909c80cf21ea07cd7c71af2c752ebf7129d318ddf54f7b9fae721f44f",
"gateway": "172.22.0.1",
"ipaddress": "172.22.0.4",
"ipprefixlen": 16,
"ipv6gateway": "",
"globalipv6address": "",
"globalipv6prefixlen": 0,
"macaddress": "02:42:ac:16:00:04",
"driveropts": null
}
}
}
}
]