31 lines
		
	
	
		
			575 B
		
	
	
	
		
			Docker
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
		
			575 B
		
	
	
	
		
			Docker
		
	
	
		
			Executable File
		
	
	
	
	
# syntax=docker/dockerfile:1.4
 | 
						|
FROM python:3-slim-bookworm AS builder
 | 
						|
 | 
						|
# Second line optional/debug/qol
 | 
						|
RUN apt update && apt install -y \
 | 
						|
    libmariadb-dev gcc \
 | 
						|
    mariadb-client
 | 
						|
 | 
						|
 | 
						|
WORKDIR /code
 | 
						|
COPY requirements.txt /code
 | 
						|
RUN target=/root/.cache/pip \
 | 
						|
    pip3 install -r requirements.txt
 | 
						|
 | 
						|
# Need to make this explicit as part of expansion, no migrations or venv
 | 
						|
COPY . .
 | 
						|
 | 
						|
ENV FLASK_APP microblog.py
 | 
						|
 | 
						|
# This might be scary to leave on
 | 
						|
#ENV FLASK_ENV development
 | 
						|
 | 
						|
ENV FLASK_RUN_PORT 8000
 | 
						|
ENV FLASK_RUN_HOST 0.0.0.0
 | 
						|
RUN flask --version
 | 
						|
 | 
						|
EXPOSE 8000
 | 
						|
 | 
						|
CMD ["flask", "run"]
 | 
						|
 |