mirror of
https://github.com/easingthemes/ssh-deploy.git
synced 2024-11-13 22:38:04 +00:00
12 lines
291 B
Docker
12 lines
291 B
Docker
|
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
|