wrote steps to install docker in readme and wrote a dockerfile for nginx not tested

This commit is contained in:
hugo gogo
2022-08-29 16:08:56 +02:00
parent a602a5d772
commit f86988a54a
8 changed files with 183 additions and 55 deletions

View File

@@ -12,3 +12,41 @@ FROM scratch
COPY tools/hello /
CMD [ "/hello" ]
## working
#FROM scratch
#WORKDIR /
#COPY hello /
#CMD [ "/hello" ]
## working, when WORKDIR is absent, it's default is set to "/"
#FROM scratch
#COPY hello /
#CMD [ "/hello" ]
## not working, when CMD execute in shell form, instead of exec form []
#FROM scratch
#COPY hello /
#CMD /hello
## not working, because c executable need library <unistd.h>
#FROM scratch
#COPY hello_c /
#CMD [ "/hello_c" ]
## not working, when executable is copied to ".", because WORKDIR value is not "." but "/" since we gave it a relativ path so it was build in top of the implicit absolut path "/"
#FROM scratch
#WORKDIR .
#COPY hello .
#CMD [ "hello" ]
## not working, when WORKDIR is set to the present directory and executable is not copied, because the workdir is not the present directory but a directory in the file system of docker : executable need to be copied there to function
#FROM scratch
#WORKDIR /home/simplonco/Desktop/42/14_inception/inception/srcs/requirements/mariadb
#CMD [ "hello" ]
## working, because "hello" is copied to "/" and execute from "/"
#FROM scratch
#WORKDIR .
#COPY hello /
#CMD [ "/hello" ]