Add a basic dockerfile
This commit is contained in:
19
Dockerfile
Normal file
19
Dockerfile
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
FROM python:3.11
|
||||||
|
|
||||||
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
|
COPY ./pyproject.toml .
|
||||||
|
COPY ./src/ .
|
||||||
|
|
||||||
|
RUN sed /^StrictHostKeyChecking/d /etc/ssh/ssh_config; \
|
||||||
|
echo StrictHostKeyChecking no >> /etc/ssh/ssh_config
|
||||||
|
|
||||||
|
RUN --mount=type=cache,target=/root/.cache \
|
||||||
|
--mount=type=ssh,required=true \
|
||||||
|
pip install .
|
||||||
|
|
||||||
|
#CMD [ "python", "./your-daemon-or-script.py" ]
|
||||||
|
|
||||||
|
# make sure to install sudo apt install docker-buildx
|
||||||
|
# make sure to set IdentityFile e.g. /home/pstruebi/.ssh/id_ed25519 in ~/.ssh/config
|
||||||
|
# build with docker build --ssh default .
|
||||||
Reference in New Issue
Block a user