mirror of
https://github.com/easingthemes/ssh-deploy.git
synced 2025-06-21 03:52:11 +10:00
e2e docker
This commit is contained in:
parent
2fdbdb60e6
commit
a9382b67a2
4 changed files with 88 additions and 46 deletions
5
test/.dockerignore
Normal file
5
test/.dockerignore
Normal file
|
@ -0,0 +1,5 @@
|
|||
/node_modules
|
||||
.gitignore
|
||||
.gitattributes
|
||||
LICENSE
|
||||
README.md
|
11
test/Dockerfile
Normal file
11
test/Dockerfile
Normal file
|
@ -0,0 +1,11 @@
|
|||
FROM nginx
|
||||
# Set args to get from Gtihub Action
|
||||
ARG ssh_pub_key
|
||||
ARG ssh_user
|
||||
# Add a user to the container
|
||||
RUN adduser -D $ssh_user
|
||||
USER $ssh_user
|
||||
# Add the ssh public key to the container
|
||||
RUN mkdir -p $HOME/.ssh
|
||||
RUN echo "$ssh_pub_key" > $HOME/.ssh/authorized_keys
|
||||
RUN chmod 700 $HOME/.ssh
|
Loading…
Add table
Add a link
Reference in a new issue