-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
31 lines (29 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
# FROM golang:1.23.2-alpine3.20 as builder
# RUN apk update && apk upgrade --available && sync && apk add --no-cache --virtual .build-deps upx
# WORKDIR /RamEater
# COPY main.sh /main.sh
# RUN chmod +x /main.sh
# CMD ["./main.sh"]
# COPY . .
# RUN go build -ldflags="-w -s" .
# RUN upx /RamEater/RamEater
# FROM alpine:3.20.0
# RUN apk update && apk upgrade --available && sync
# COPY --from=builder /RamEater/RamEater /RamEater
# FROM rust:1.82.0-alpine3.20 as builder
# WORKDIR /Eater
# RUN apk update && apk upgrade --available && sync && apk add --no-cache --virtual .build-deps musl-dev libressl-dev build-base pkgconfig
# COPY . .
# RUN cargo build --release
# FROM alpine:3.20.3
# RUN apk update && apk upgrade --available && sync
# COPY --from=builder /Eater/target/release/Eater /Eater
# ENTRYPOINT ["/Eater"]
FROM python:3.13.1-alpine3.20
ENV VIRTUAL_ENV=/opt/venv
RUN python3 -m venv $VIRTUAL_ENV
WORKDIR /Eater
ENV PATH="$VIRTUAL_ENV/bin:$PATH" PYTHONUNBUFFERED=1 PIP_NO_CACHE_DIR=1
COPY . .
RUN apk update && apk upgrade --available && sync && apk add --no-cache --update --virtual .build-deps build-base gcc linux-headers python3-dev && python3 -m pip install -U pip && pip3 install --no-cache-dir -U setuptools wheel && pip3 install --no-cache-dir -U -r requirements.txt && apk --purge del .build-deps && rm -rf /var/cache/apk/* && python3 -m compileall -b -o 2 . && rm -rf main.py requirements.txt /var/cache/apk/*
ENTRYPOINT ["python3", "main.pyc"]