Add compose file and a few comments
This commit is contained in:
@@ -10,10 +10,12 @@ echo StrictHostKeyChecking no >> /etc/ssh/ssh_config
|
||||
|
||||
RUN --mount=type=cache,target=/root/.cache \
|
||||
--mount=type=ssh,required=true \
|
||||
pip install .
|
||||
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 .
|
||||
# make sure to set IdentityFile /home/pstruebi/.ssh/id_ed25519 in ~/.ssh/config -maybe not nececcary
|
||||
# example build commands:
|
||||
# docker build --ssh default .
|
||||
# docker build --ssh default=~/.ssh/id_rsa .
|
||||
@@ -0,0 +1,16 @@
|
||||
services:
|
||||
app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
#ssh: ["default"] # Enable SSH agent forwarding
|
||||
ssh: ['default','default=~/.ssh/'] #raspi
|
||||
volumes:
|
||||
- /dev:/dev # Mount /dev from host to container
|
||||
environment:
|
||||
- DOCKER_BUILDKIT=1 # Enable BuildKit (can also be passed during build)
|
||||
# deploy:
|
||||
# resources:
|
||||
# reservations:
|
||||
# devices:
|
||||
# - capabilities: [all] # Ensures the container can use /dev as needed
|
||||
Reference in New Issue
Block a user