more lectures
This commit is contained in:
Родитель
5a379eb7e5
Коммит
c4da18391c
|
@ -0,0 +1,7 @@
|
|||
FROM alpine
|
||||
|
||||
# method one, shell form
|
||||
CMD sleep 10000
|
||||
|
||||
# method two, exec form
|
||||
#CMD ["sleep", "10000"]
|
|
@ -0,0 +1,7 @@
|
|||
FROM alpine
|
||||
|
||||
# the executable
|
||||
ENTRYPOINT ["sleep"]
|
||||
|
||||
# the default arguments
|
||||
CMD ["10000"]
|
|
@ -0,0 +1,7 @@
|
|||
FROM alpine
|
||||
|
||||
COPY ./docker-entrypoint.sh /
|
||||
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
|
||||
CMD ["ping", "8.8.8.8"]
|
|
@ -0,0 +1,6 @@
|
|||
FROM alpine
|
||||
|
||||
COPY ./do-stuff-then-ping.sh /
|
||||
|
||||
CMD ["/do-stuff-then-ping.sh"]
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
cat /etc/hosts
|
||||
echo "ok i'm done, now let's ping'"
|
||||
|
||||
ping 8.8.8.8
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
cat /etc/hosts
|
||||
echo "ok i'm done, now let's ping'"
|
||||
|
||||
exec "$@"
|
Загрузка…
Ссылка в новой задаче