diff --git a/examples/docker/python3-alpine/Dockerfile b/examples/docker/python3-alpine/Dockerfile index 48c33b9..e679178 100644 --- a/examples/docker/python3-alpine/Dockerfile +++ b/examples/docker/python3-alpine/Dockerfile @@ -1,10 +1,10 @@ -FROM python:3-alpine +FROM python:3.11-alpine WORKDIR /usr/src/app COPY requirements.txt ./ -RUN apk add --no-cache libuv-dev git openssl-dev libffi-dev build-base python3-dev +RUN apk add --no-cache libuv-dev git openssl-dev libffi-dev build-base python3-dev libstdc++ gcompat RUN pip install --no-cache-dir -r requirements.txt diff --git a/examples/docker/python3-arch/Dockerfile b/examples/docker/python3-arch/Dockerfile new file mode 100644 index 0000000..85e4d2d --- /dev/null +++ b/examples/docker/python3-arch/Dockerfile @@ -0,0 +1,15 @@ +FROM archlinux:latest + +WORKDIR /usr/src/app + +COPY requirements.txt ./ + + +RUN yes | pacman -Sy python python-pip libuv openssl git +RUN pip install --no-cache-dir -r requirements.txt + +COPY . . + +EXPOSE 3000 + +CMD [ "python", "./main.py" ] \ No newline at end of file diff --git a/examples/docker/python3-arch/main.py b/examples/docker/python3-arch/main.py new file mode 100644 index 0000000..80d037c --- /dev/null +++ b/examples/docker/python3-arch/main.py @@ -0,0 +1,6 @@ +from socketify import App + +app = App() +app.get("/", lambda res, req: res.end("Hello World socketify from Python!")) +app.listen(3000, lambda config: print("Listening on port http://localhost:%d now\n" % config.port)) +app.run() \ No newline at end of file diff --git a/examples/docker/python3-arch/requirements.txt b/examples/docker/python3-arch/requirements.txt new file mode 100644 index 0000000..7a22543 --- /dev/null +++ b/examples/docker/python3-arch/requirements.txt @@ -0,0 +1 @@ +git+https://github.com/cirospaciari/socketify.py.git@main#socketify \ No newline at end of file