Copie dockerfile

Exemple de cod

6
0

copiați fișierul din containerul docker pentru a găzdui

docker cp <containerId>:/file/path/within/container /host/path/target
1
0

copiați fișierul de la gazdă la container docker

docker cp foo.txt mycontainer:/foo.txt
1
0

exemplu dockerfile

FROM ubuntu:18.04
COPY . /app
RUN make /app
CMD python /app/app.py
1
0

docker ARG

$ docker build --build-arg some_variable_name=a_value
0
0

dockerfile copiați fișiere specifice

COPY ["__BUILD_NUMBER", "README.md", "gulpfile", "another_file", "./"]
		All the files and folders, the last is destination
-2
0

dockerfile rulează aplicația cmd

RUN apt-get install python3
CMD echo "Hello world"
ENTRYPOINT echo "Hello world"

În alte limbi

Această pagină este în alte limbi

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................