Hong5489 / Custom-CTFd-Engine

Custom CTFd platform used in SKR CTF
https://skrctf.me
Apache License 2.0
6 stars 5 forks source link

If we try to run with docker and without docker getting lot more errors while setup in local #7

Open loyality7 opened 6 months ago

loyality7 commented 6 months ago

python3 serve.py INFO [alembic.runtime.migration] Context impl SQLiteImpl. INFO [alembic.runtime.migration] Will assume non-transactional DDL. Traceback (most recent call last): File "/home/babu/Custom-CTFd-Engine/serve.py", line 3, in app = create_app() ^^^^^^^^^^^^ File "/home/babu/Custom-CTFd-Engine/CTFd/init.py", line 175, in create_app update_check(force=True) File "/home/babu/Custom-CTFd-Engine/CTFd/utils/updates/init.py", line 45, in update_check 'db_driver': db.session.bind.dialect.name, ^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'dialect'

loyality7 commented 6 months ago

see in docker : ─$ docker-compose build [+] Building 10.5s (22/42) docker:default => [webshell internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 894B 0.0s => [server-skr internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 591B 0.0s => [webshell internal] load .dockerignore 0.1s => => transferring context: 2B 0.0s => [ctfd internal] load build definition from Dockerfile 0.1s => => transferring dockerfile: 1.42kB 0.0s => [server-skr internal] load .dockerignore 0.1s => => transferring context: 2B 0.0s => [ctfd internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [webshell internal] load metadata for docker.io/library/ubuntu:latest 2.1s => [server-skr internal] load metadata for docker.io/library/debian:stable-slim 2.1s => [ctfd internal] load metadata for docker.io/library/python:3.7-slim-buster 0.0s => [ctfd 1/9] FROM docker.io/library/python:3.7-slim-buster 0.0s => [ctfd internal] load build context 5.2s => => transferring context: 208.10MB 5.1s => CACHED [ctfd 2/9] WORKDIR /opt/CTFd 0.0s => CACHED [ctfd 3/9] RUN mkdir -p /opt/CTFd /var/log/CTFd /var/uploads 0.0s => CANCELED [ctfd 4/9] RUN apt-get update && apt-get install -y build-essential default-mysql-client python-dev libffi-dev libssl-dev 10.2s => [webshell 1/6] FROM docker.io/library/ubuntu@sha256:3f85b7caad41a95462cf5b787d8a04604c8262cdcdf9a472b8c52ef83375fe15 0.0s => [webshell internal] load build context 0.0s => => transferring context: 8.80kB 0.0s => CACHED [webshell 2/6] COPY ./shellinabox.py ./shellinabox.init /opt/ 0.0s => CACHED [webshell 3/6] RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections 0.0s => CANCELED [webshell 4/6] RUN DEBIAN_FRONTEND=noninteractive apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y -q python3 shellinabox strace ssh && useradd -ms / 8.2s => [server-skr internal] load build context 0.1s => => transferring context: 43.71kB 0.0s => CACHED [server-skr 1/15] FROM docker.io/library/debian:stable-slim@sha256:ff394977014e94e9a7c67bb22f5014ea069d156b86e001174f4bae6f4618297a 0.0s => ERROR [server-skr 2/15] RUN apt-get update && apt-get -y install gcc socat nano openssh-server netcat python3 python3-pip python3-dev git libssl-dev libffi-dev build-essential 8.0s

[server-skr 2/15] RUN apt-get update && apt-get -y install gcc socat nano openssh-server netcat python3 python3-pip python3-dev git libssl-dev libffi-dev build-essential gdb: 1.389 Get:1 http://deb.debian.org/debian stable InRelease [151 kB] 1.685 Get:2 http://deb.debian.org/debian stable-updates InRelease [55.4 kB] 1.953 Get:3 http://deb.debian.org/debian-security stable-security InRelease [48.0 kB] 1.982 Get:4 http://deb.debian.org/debian stable/main amd64 Packages [8786 kB] 3.972 Get:5 http://deb.debian.org/debian stable-updates/main amd64 Packages [13.8 kB] 4.036 Get:6 http://deb.debian.org/debian-security stable-security/main amd64 Packages [157 kB] 5.356 Fetched 9212 kB in 4s (2164 kB/s) 5.356 Reading package lists... 6.389 Reading package lists... 7.404 Building dependency tree... 7.630 Reading state information... 7.638 Package netcat is a virtual package provided by: 7.638 netcat-openbsd 1.219-1 7.638 netcat-traditional 1.10-47 7.638 7.642 E: Package 'netcat' has no installation candidate

failed to solve: executor failed running [/bin/sh -c apt-get update && apt-get -y install gcc socat nano openssh-server netcat python3 python3-pip python3-dev git libssl-dev libffi-dev build-essential gdb]: exit code: 100