Hello talzac;
You can use the dockerfile for this operation;
example:
create new document on you server with name Dockerfile
FROM debian
MAINTAINER Lucas Simão<lucas.simao01@gmail.com>
RUN apt-get update && apt-get install -y nano && apt-get clean
EXPOSE 8484
ENTRYPOINT "put your code here" && /bin/bash
#exemple ENTRYPOINT service nginx start && service ssh start && /bin/bash "use && to separate your code"
after save your code on /root, create a new image docker using
docker build -t lucassimao/teste:0.1 /root/
start new container
docker run -it lucassimao/teste:0.1 /bin/bash