![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 149 Pomógł: 7 Dołączył: 6.01.2010 Skąd: Opole Lubelskie Ostrzeżenie: (0%) ![]() ![]() |
Zapoznaję się z dockerem i mam jeden problem. Dla każdego kontenera chcę mieć inne IP. Różne IP potrzebne mi do przypisania domeny w pliku hosts (win 10). Da się to jakoś rozwiązać? W sieci nic nie znalazłem. Docker zainstalowany na win10.
|
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 149 Pomógł: 7 Dołączył: 6.01.2010 Skąd: Opole Lubelskie Ostrzeżenie: (0%) ![]() ![]() |
@nospor
Utworzę sobie obrazy odpowiednie i na ich bazie będę tworzyć kontenery dla projektu @by_ikar Mam testowo 3 kontenery, więc to odpada. Punkty 2 i 3 prawdopodobne (IMG:style_emoticons/default/smile.gif) Zrobię tak jak mospor radził. Dzięki za pomoc. Mam taki DockerFile: Kod # A basic apache server. To use either add or bind mount content under /var/www FROM phusion/baseimage MAINTAINER Lukasz <kontakt@lukasz-socha.pl> version: 0.1 RUN apt-get update && \ apt-get install -y apache2 && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* ENV APACHE_RUN_USER www-data ENV APACHE_RUN_GROUP www-data ENV APACHE_LOG_DIR /var/log/apache2 ENV APACHE_PID_FILE /var/run/apache2.pid ENV APACHE_RUN_DIR /var/run/apache2 ENV APACHE_LOCK_DIR /var/lock/apache2 ENV APACHE_LOG_DIR /var/log/apache2 RUN mkdir -p /var/run /var/lock/apache2 /var/log EXPOSE 80 CMD ["apache2","-D","FOREGROUND"] W PowerSHell ciągle mam: Kod Windows PowerShell Copyright (C) 2016 Microsoft Corporation. All rights reserved. PS C:\Program Files\Docker Toolbox> cd Z:\Projekty\dev PS Z:\Projekty\dev> docker build -t apache2 images/apache2 Sending build context to Docker daemon 2.56 kB Step 1 : FROM phusion/baseimage latest: Pulling from phusion/baseimage f069f1d21059: Already exists ecbeec5633cf: Already exists ea6f18256d63: Already exists 54bde7b02897: Already exists a3ed95caeb02: Already exists ce9e695a6234: Waiting Ile taki obraz powinien się tworzyć? |
|
|
![]() ![]() |
![]() |
Aktualny czas: 8.10.2025 - 18:18 |