Skip to content

Commit

Permalink
Use volume for better permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
Sammyjo20 committed Jul 28, 2024
1 parent 72b6c2a commit 2949025
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 0 additions & 2 deletions .docker/.gitignore

This file was deleted.

8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
FROM sammyjo20/ssh-php:latest

# Install Composer
# Switch to root

USER root

RUN apk update && apk add composer

# Copy all files

COPY ./src ./src
Expand All @@ -16,6 +14,10 @@ COPY ./composer.lock ./

RUN ln -s ./src/index.php ./index.php

# Create the .ssh folder

RUN mkdir .ssh

# Update the server's ownership

RUN chown -R server:server /home/server
Expand Down
4 changes: 3 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
build:
context: .
volumes:
- ./.docker/.ssh:/home/server/.ssh
- ssh-php-ssh:/home/server/.ssh
ports:
- 2201:22 # Change to 22:22 if you don't have an SSH server running already
restart: unless-stopped
Expand All @@ -13,3 +13,5 @@ services:
options:
max-size: "50m"
max-file: "5"
volumes:
ssh-php-ssh:

0 comments on commit 2949025

Please sign in to comment.