mirror of https://github.com/JohnHammond/CTFd.git
Changing to Ubuntu and docker-compose v2. Closes #185
parent
6eee636893
commit
09398b2ab0
11
Dockerfile
11
Dockerfile
|
@ -1,8 +1,11 @@
|
||||||
FROM alpine:3.2
|
FROM ubuntu:latest
|
||||||
RUN apk update && apk upgrade
|
RUN apt-get update -y
|
||||||
RUN apk add git gcc musl-dev libffi-dev python python-dev py-pip
|
RUN apt-get upgrade -y
|
||||||
|
RUN apt-get install build-essential python-dev python-pip libffi-dev -y
|
||||||
|
|
||||||
RUN mkdir /opt
|
VOLUME ["/opt/CTFd"]
|
||||||
|
|
||||||
|
RUN mkdir -p /opt/CTFd
|
||||||
COPY . /opt/CTFd
|
COPY . /opt/CTFd
|
||||||
WORKDIR /opt/CTFd
|
WORKDIR /opt/CTFd
|
||||||
|
|
||||||
|
|
|
@ -1,26 +1,21 @@
|
||||||
ctfd:
|
version: '2'
|
||||||
build: .
|
|
||||||
restart: always
|
|
||||||
ports:
|
|
||||||
- "8000:8000"
|
|
||||||
environment:
|
|
||||||
- DATABASE_URL=mysql+pymysql://root@db/ctfd
|
|
||||||
volumes_from:
|
|
||||||
- data:rw
|
|
||||||
links:
|
|
||||||
- db:db
|
|
||||||
|
|
||||||
db:
|
services:
|
||||||
image: mysql
|
ctfd:
|
||||||
environment:
|
build: .
|
||||||
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
|
restart: always
|
||||||
volumes_from:
|
ports:
|
||||||
- data:rw
|
- "8000:8000"
|
||||||
|
environment:
|
||||||
|
- DATABASE_URL=mysql+pymysql://root@db/ctfd
|
||||||
|
volumes:
|
||||||
|
- .data/CTFd/logs:/opt/CTFd/CTFd/logs
|
||||||
|
links:
|
||||||
|
- db:db
|
||||||
|
|
||||||
data:
|
db:
|
||||||
image: mysql
|
image: mysql
|
||||||
restart: always
|
environment:
|
||||||
volumes:
|
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
|
||||||
- /var/lib/mysql
|
volumes:
|
||||||
- /opt/CTFd/CTFd/logs
|
- .data/mysql:/var/lib/mysql
|
||||||
command: "tail -f /dev/null"
|
|
||||||
|
|
Loading…
Reference in New Issue