-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
42 lines (36 loc) · 1.43 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# ------------------------------------------------------------------------------
# Install compiler and compile darkhttpd
FROM ubuntu:jammy AS build
ADD darkhttpd /dark
WORKDIR /dark
RUN apt-get update && \
apt-get install -y build-essential && \
gcc -Wall -O2 darkhttpd.c -o darkhttpd.exe && \
strip darkhttpd.exe
# ------------------------------------------------------------------------------
# Pull base image
FROM ubuntu:jammy
MAINTAINER Brett Kuskie <fullaxx@gmail.com>
# ------------------------------------------------------------------------------
# Set environment variables
ENV DEBIAN_FRONTEND noninteractive
# ------------------------------------------------------------------------------
# Install software and clean up
RUN apt-get update && \
apt-get install -y --no-install-recommends \
supervisor python3-pip && \
pip3 install yfinance && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /var/tmp/* /tmp/*
# ------------------------------------------------------------------------------
# Prepare the image
COPY supervisord.conf /etc/supervisor/supervisord.conf
COPY gen_html_yf.py /app/
COPY static/* /www/static/
COPY --from=build /dark/darkhttpd.exe /app/
# ------------------------------------------------------------------------------
# Expose ports
EXPOSE 80
# ------------------------------------------------------------------------------
# Define default command
CMD ["supervisord", "-c", "/etc/supervisor/supervisord.conf"]