IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Docker Discussion :

aide sur mise en place d'un docker container apache/PHP avec SSL


Sujet :

Docker

  1. #1
    Membre du Club
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Janvier 2015
    Messages
    76
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Gironde (Aquitaine)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Conseil

    Informations forums :
    Inscription : Janvier 2015
    Messages : 76
    Points : 58
    Points
    58
    Par défaut aide sur mise en place d'un docker container apache/PHP avec SSL
    Salut à tous,

    Je cherche à me créer ma propre image de container docker pour mes développements PHP.
    Pour cela j'utilise docker compose et à partir d'une image Ubuntu je provisionne manuellement tous ce dont j'ai besoin dans mon container (je ne veux pas utiliser les images de bases existantes!).
    Je suis sous Windows 11 et j'utilise Docker Desktop.

    Mes builds d'images et de container semblent fonctionner sans génération d'erreur.
    Une fois dans mon container Apache/PHP je valide bien que mon serveur Web démarre correctement et n'a pas de problème de configuration.

    Malgré tout mon navigateur n'arrive pas à obtenir un retour (même en erreur) de mon serveur Web Apache dans mon container Docker. Je n'ai aucun log généré dans les fichiers de log apache du projet non plus.

    Ainsi j'aimerais vous partager l'ensemble de ma configuration que vous pussiez me dire ce que vous en pensé et si vous constatez éventuellement des problèmes dans celle-ci.


    docker-compose

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    version: '3.9'
    
    services:
    
      server:
        build:
          context: ./docker
          dockerfile: server/Dockerfile
        container_name: 'project-name--server'
        ports:
          - "80:80"
          - "443:443"
        working_dir: /var/www/project-name
        volumes:
          - C:/PROJECT/PHPSTORM/OWN/project-name:/var/www/project-name

    dockerfile

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    FROM ubuntu:18.04
    
    ENV RUNNING_IN_DOCKER true
    ENV DEBCONF_NONINTERACTIVE_SEEN true
    
    RUN export DEBIAN_FRONTEND=noninteractive
    ENV DEBIAN_FRONTEND=noninteractive
    ENV DEBIAN_FRONTEND noninteractive
    
    # Update the container #######################################################################################################
    
    RUN apt-get -y update
    RUN apt-get -y install build-essential
    RUN apt-get -y install zlib1g-dev libssl-dev libreadline-gplv2-dev
    RUN apt-get -y install curl zip unzip
    RUN apt-get -y install software-properties-common
    RUN apt-get -y install gnupg2
    RUN apt-get -y install whois
    
    #### SYSTEM ############################################################
    
    RUN apt-get update
    RUN apt-get install -y vim
    RUN apt-get install -y nano
    RUN apt-get install -y curl
    RUN apt-get install -y git
    RUN apt-get install -y wget
    RUN apt-get install -y build-essential
    RUN apt-get install -y cmake
    RUN apt-get install -y zlib1g-dev
    RUN apt-get install -y libcppunit-dev
    RUN apt-get install -y libzip-dev
    RUN apt-get install -y libpng-dev
    RUN apt-get install -y libicu-dev
    RUN apt-get install -y libssl-dev
    RUN apt-get install -y libz-dev
    RUN apt-get install -y libxml2-dev
    RUN apt-get install -y libmemcached-dev
    RUN apt-get install -y unzip
    RUN apt-get install -y apt-utils
    RUN apt-get install -y memcached
    RUN apt-get install -y openssl
    RUN apt-get install -y zsh
    RUN apt-get install -y w3m
    RUN apt-get install -y net-tools
    
    # SHELL ####################################################################################
    
    RUN chsh -s $(which zsh)
    RUN sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
    RUN chsh -s $(which zsh) $(whoami)
    
    # PHP 7.3 ##############################################################################################################
    
    RUN add-apt-repository ppa:ondrej/php
    RUN apt-get update
    
    RUN apt-get -y install php7.3
    RUN apt-get -y install php7.3-fpm
    RUN apt-get -y install php7.3-cli
    RUN apt-get -y install php7.3-json
    RUN apt-get -y install php7.3-pdo
    RUN apt-get -y install php7.3-mysql
    RUN apt-get -y install php7.3-zip
    RUN apt-get -y install php7.3-gd
    RUN apt-get -y install php7.3-mbstring
    RUN apt-get -y install php7.3-curl
    RUN apt-get -y install php7.3-dev
    RUN apt-get -y install php7.3-xdebug
    RUN apt-get -y install php7.3-xml
    RUN apt-get -y install php7.3-bcmath
    
    RUN apt-get -y install php-pear
    RUN apt-get -y install phpunit
    
    RUN apt-get -y purge php8.*
    RUN apt-get -y autoclean
    RUN apt-get -y autoremove
    
    # Apache ###################################################################################
    
    RUN apt-get install -y apache2
    
    # activation Apache MPM Event for FPM
    RUN a2dismod php7.3
    RUN a2dismod mpm_prefork
    RUN a2enmod mpm_event
    
    # installation FPM
    RUN apt-get install -y php7.3-fpm
    RUN apt-get install -y libapache2-mod-fcgid
    RUN a2enconf php7.3-fpm
    RUN a2enmod proxy
    RUN a2enmod proxy_fcgi
    RUN a2enmod actions
    RUN a2enmod fcgid
    RUN a2enmod alias
    
    #RUN sed -i 's/listen = \/run\/php\/php7.3-fpm.sock/listen=127.0.0.1:9000/' /etc/php/7.3/fpm/pool.d/www.conf
    
    # activation module apache
    RUN a2enmod ssl
    RUN a2enmod rewrite
    RUN # a2enmod proxy_balancer
    RUN # a2enmod proxy_http
    RUN # a2enmod proxy_ajp
    
    # structure project
    RUN mkdir /var/log/apache2/project-name
    
    # mise en place du serverName apache dans le hosts du system
    RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
    RUN echo "172.21.0.2 project-name" >> /etc/hosts
    
    RUN apt-get -y install memcached
    RUN apt-get -y install php-memcached
    
    COPY server//apache//sites-enabled//project-name.conf /etc/apache2/sites-available
    
    RUN apt-get -y purge php8.*
    RUN apt-get -y autoclean
    RUN apt-get -y autoremove
    
    RUN a2dissite 000-default
    RUN a2ensite project-name
    
    EXPOSE 80
    EXPOSE 443
    
    #CMD /usr/sbin/apache2ctl -D FOREGROUND
    #CMD service apache2 start
    
    #CMD ["apache2ctl", "-D","FOREGROUND"]
    
    ## NODE JS #########################################################################
    
    RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -
    RUN apt-get install -y nodejs
    
    ENTRYPOINT ["tail", "-f", "/dev/null"]

    vhost

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    <VirtualHost *:443>
    
            <FilesMatch .php$>
                SetHandler "proxy:unix:/var/run/php/php7.3-fpm.sock|fcgi://localhost"
            </FilesMatch>
    
            ServerName project-name
            DocumentRoot /var/www/project-name/public
    
            SSLEngine on
            SSLCertificateFile /var/www/project-name/project-name.crt
            SSLCertificateKeyFile /var/www/project-name/project-name.key
    
            ErrorLog /var/log/apache2/project-name/error.log
            CustomLog /var/log/apache2/project-name/access.log Combined
    
            RewriteEngine On
            RewriteCond %{HTTP:Authorization} ^(.*)
            RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
    
            <Directory /var/www/project-name/public>
                AllowOverride All
                Require all granted
            </Directory>
    
            <Directory /var/www/project-name/var>
                <IfModule mod_authz_core.c>
                    Require all denied
                </IfModule>
                <IfModule !mod_authz_core.c>
                    Order deny,allow
                    Deny from all
                </IfModule>
            </Directory>
    
            <Directory /var/www/project-name/public>
                DirectoryIndex /var/www/project-name/public/index.php
                <IfModule mod_negotiation.c>
                    Options -MultiViews
                </IfModule>
    
                <IfModule mod_rewrite.c>
                    RewriteEngine On
                    RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
                    RewriteRule ^(.*) - [E=BASE:%1]
    
                    RewriteCond %{HTTP:Authorization} .
                    RewriteRule ^ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    
                    RewriteCond %{ENV:REDIRECT_STATUS} ^$
                    RewriteRule ^index\.php(?:/(.*)|$) %{ENV:BASE}/$1 [R=301,L]
    
                    RewriteCond %{REQUEST_FILENAME} -f
                    RewriteRule ^ - [L]
    
                    RewriteRule ^ %{ENV:BASE}/index.php [L]
                </IfModule>
    
                <IfModule !mod_rewrite.c>
                    <IfModule mod_alias.c>
                        RedirectMatch 302 ^/$ /index.php/
                    </IfModule>
                </IfModule>
            </Directory>
    
    </VirtualHost>
    
    <VirtualHost *:80>
        ServerName project-name
        DocumentRoot /var/www/project-name/public
        Redirect permanent / https://project-name/
    </VirtualHost>
    Voici ce que me dit le docker inspect de mon container :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    [
        {
            "Id": "4c3ba5bf5401c68a1a632115009a576579042b6a49930c9938930f211c71b610",
            "Created": "2022-05-28T11:50:39.603402048Z",
            "Path": "tail",
            "Args": [
                "-f",
                "/dev/null"
            ],
            "State": {
                "Status": "running",
                "Running": true,
                "Paused": false,
                "Restarting": false,
                "OOMKilled": false,
                "Dead": false,
                "Pid": 26369,
                "ExitCode": 0,
                "Error": "",
                "StartedAt": "2022-05-28T11:50:40.520448184Z",
                "FinishedAt": "0001-01-01T00:00:00Z"
            },
            "Image": "sha256:335b2506fd56c9f806e6a2316bd5a594c16bf790a5e802e6e23349ea286fd428",
            "ResolvConfPath": "/var/lib/docker/containers/4c3ba5bf5401c68a1a632115009a576579042b6a49930c9938930f211c71b610/resolv.conf",
            "HostnamePath": "/var/lib/docker/containers/4c3ba5bf5401c68a1a632115009a576579042b6a49930c9938930f211c71b610/hostname",
            "HostsPath": "/var/lib/docker/containers/4c3ba5bf5401c68a1a632115009a576579042b6a49930c9938930f211c71b610/hosts",
            "LogPath": "/var/lib/docker/containers/4c3ba5bf5401c68a1a632115009a576579042b6a49930c9938930f211c71b610/4c3ba5bf5401c68a1a632115009a576579042b6a49930c9938930f211c71b610-json.log",
            "Name": "/project-name--server",
            "RestartCount": 0,
            "Driver": "overlay2",
            "Platform": "linux",
            "MountLabel": "",
            "ProcessLabel": "",
            "AppArmorProfile": "",
            "ExecIDs": [
                "b70c49c456feeea21575fd15861c51ae94be94a19964f183bfc2edee5998c726"
            ],
            "HostConfig": {
                "Binds": [
                    "C:/PROJECT/PHPSTORM/OWN/project-name:/var/www/project-name:rw"
                ],
                "ContainerIDFile": "",
                "LogConfig": {
                    "Type": "json-file",
                    "Config": {}
                },
                "NetworkMode": "project-name_default",
                "PortBindings": {
                    "443/tcp": [
                        {
                            "HostIp": "",
                            "HostPort": "443"
                        }
                    ],
                    "80/tcp": [
                        {
                            "HostIp": "",
                            "HostPort": "80"
                        }
                    ]
                },
                "RestartPolicy": {
                    "Name": "",
                    "MaximumRetryCount": 0
                },
                "AutoRemove": false,
                "VolumeDriver": "",
                "VolumesFrom": null,
                "CapAdd": null,
                "CapDrop": null,
                "CgroupnsMode": "host",
                "Dns": null,
                "DnsOptions": null,
                "DnsSearch": null,
                "ExtraHosts": [],
                "GroupAdd": null,
                "IpcMode": "private",
                "Cgroup": "",
                "Links": null,
                "OomScoreAdj": 0,
                "PidMode": "",
                "Privileged": false,
                "PublishAllPorts": false,
                "ReadonlyRootfs": false,
                "SecurityOpt": null,
                "UTSMode": "",
                "UsernsMode": "",
                "ShmSize": 67108864,
                "Runtime": "runc",
                "ConsoleSize": [
                    0,
                    0
                ],
                "Isolation": "",
                "CpuShares": 0,
                "Memory": 0,
                "NanoCpus": 0,
                "CgroupParent": "",
                "BlkioWeight": 0,
                "BlkioWeightDevice": null,
                "BlkioDeviceReadBps": null,
                "BlkioDeviceWriteBps": null,
                "BlkioDeviceReadIOps": null,
                "BlkioDeviceWriteIOps": null,
                "CpuPeriod": 0,
                "CpuQuota": 0,
                "CpuRealtimePeriod": 0,
                "CpuRealtimeRuntime": 0,
                "CpusetCpus": "",
                "CpusetMems": "",
                "Devices": null,
                "DeviceCgroupRules": null,
                "DeviceRequests": null,
                "KernelMemory": 0,
                "KernelMemoryTCP": 0,
                "MemoryReservation": 0,
                "MemorySwap": 0,
                "MemorySwappiness": null,
                "OomKillDisable": false,
                "PidsLimit": null,
                "Ulimits": null,
                "CpuCount": 0,
                "CpuPercent": 0,
                "IOMaximumIOps": 0,
                "IOMaximumBandwidth": 0,
                "MaskedPaths": [
                    "/proc/asound",
                    "/proc/acpi",
                    "/proc/kcore",
                    "/proc/keys",
                    "/proc/latency_stats",
                    "/proc/timer_list",
                    "/proc/timer_stats",
                    "/proc/sched_debug",
                    "/proc/scsi",
                    "/sys/firmware"
                ],
                "ReadonlyPaths": [
                    "/proc/bus",
                    "/proc/fs",
                    "/proc/irq",
                    "/proc/sys",
                    "/proc/sysrq-trigger"
                ]
            },
            "GraphDriver": {
                "Data": {
                    "LowerDir": "/var/lib/docker/overlay2/d14231cead21e84ac9a2d840404d84e105be372f1945dc5311bda7f3aeb9be58-init/diff:/var/lib/docker/overlay2/mtld06p8j69pjfdjahfyzau98/diff:/var/lib/docker/overlay2/kzlxhwt6e8nzyk7a1kds9judt/diff:/var/lib/docker/overlay2/
    l5qs4ndicbtgd1jkyk3v6q8el/diff:/var/lib/docker/overlay2/2a7n57o6r6iztdzw3byqjnhbk/diff:/var/lib/docker/overlay2/tdkh5ysi2a2lproesfxxltqm9/diff:/var/lib/docker/overlay2/cax9f87524a7fd41xe4ivdqx0/diff:/var/lib/docker/overlay2/kd49q4dxagkx0on0rvikcimzo/diff:/var/lib/do
    cker/overlay2/zcg4ro5rf7ixjzyra93ubq5c5/diff:/var/lib/docker/overlay2/k2zb0gam34b383bn3zj0yrji4/diff:/var/lib/docker/overlay2/tw7hr50y8u4zr3zy463o42ev1/diff:/var/lib/docker/overlay2/0vy2k99fbz5tbnuyof99z6xxp/diff:/var/lib/docker/overlay2/po7qqfqfjfwhnvidv4soiuc3n/di
    ff:/var/lib/docker/overlay2/x6bryqw6w79rbuichafyb4fqv/diff:/var/lib/docker/overlay2/pj3gnth5hfw6hu9j8c6y13n7u/diff:/var/lib/docker/overlay2/pum6x01zyosqnat7pbf89giir/diff:/var/lib/docker/overlay2/xnxhhazakmgohu53ngo0a352b/diff:/var/lib/docker/overlay2/rbp3q2pw00bjz5
    t1y337xzj7x/diff:/var/lib/docker/overlay2/4cwzyup2gmffw89ouxpx1r83m/diff:/var/lib/docker/overlay2/anbo5mdiprruqmgfp0ydbsyxp/diff:/var/lib/docker/overlay2/xem661ejz4gh11it2tqzfz2fy/diff:/var/lib/docker/overlay2/9vgyv8dixm4bwj6xmuo7dujn0/diff:/var/lib/docker/overlay2/
    irxa7cxbpzli75j0rxi7mjyik/diff:/var/lib/docker/overlay2/p3srld3uywvpmagl9648yn81q/diff:/var/lib/docker/overlay2/2e1npglolpm8jzfjt7glws8xh/diff:/var/lib/docker/overlay2/v8dhfixem6231qjualllsywkp/diff:/var/lib/docker/overlay2/5ksmrmv17d02juo0r4vccg5y4/diff:/var/lib/do
    cker/overlay2/rpif1fz4oq091a9l832u6gc7n/diff:/var/lib/docker/overlay2/vfp1dlzdi1y0cx4g93r4v9tm3/diff:/var/lib/docker/overlay2/2kvju8oopmdss3fjn76gan74d/diff:/var/lib/docker/overlay2/z5hmgbp2ainppqcazedtgbo0b/diff:/var/lib/docker/overlay2/mbuftkf2jry3trk0rqn94qq8m/di
    ff:/var/lib/docker/overlay2/vri1n1qntj9b369ppmdbnzdew/diff:/var/lib/docker/overlay2/lm9kiqk7jscbg8c128rr7sx8h/diff:/var/lib/docker/overlay2/5ccqyqx93x548gb5nlqnvy49q/diff:/var/lib/docker/overlay2/qwkcw1tcezl6ngfqo7edsq735/diff:/var/lib/docker/overlay2/ptzw6rdtovvd5m
    rlzgn69mkrf/diff:/var/lib/docker/overlay2/c2gpa9c47nv2g0a00ohxlp9sg/diff:/var/lib/docker/overlay2/vkxmm7x6hgacmamq4h8y26gwv/diff:/var/lib/docker/overlay2/cacv0z53h8fdd8i0c2d2k7k28/diff:/var/lib/docker/overlay2/3g2z553ge7hhv4mk6gle4mfbv/diff:/var/lib/docker/overlay2/
    uvm7ovkxea6xn858rmgk9stb3/diff:/var/lib/docker/overlay2/ljvr3ivw07iethiq6ic6458pi/diff:/var/lib/docker/overlay2/phufmk0j7jn103v2h49igszal/diff:/var/lib/docker/overlay2/uhpy9xe7qf089toa3cymrlf3f/diff:/var/lib/docker/overlay2/l4ijp79xfudj9lft7f0jbbm3l/diff:/var/lib/do
    cker/overlay2/k9zu478j67m7daqa3wcjwc5yh/diff:/var/lib/docker/overlay2/0ggkac9fc7cnb9xphns8wnx4u/diff:/var/lib/docker/overlay2/uyymrg9pkl2rwqgvta1o0w99j/diff:/var/lib/docker/overlay2/22l1dqcx9707j89z2gj2p1wi1/diff:/var/lib/docker/overlay2/9qtwux8xo2ktaxma9kkxhs4us/di
    ff:/var/lib/docker/overlay2/o3q6foxlkgjcqro1nc084ngtz/diff:/var/lib/docker/overlay2/dz18t8ikh7rdleskd0k4rnr1g/diff:/var/lib/docker/overlay2/1al1yo82h0amfd2knrea515pj/diff:/var/lib/docker/overlay2/iybyslcaqy5ki3l7llgjpg893/diff:/var/lib/docker/overlay2/xyepsjkze4g76i
    nbuulnvxaxq/diff:/var/lib/docker/overlay2/mzgnjo0tfxfwm9nfgqeli062v/diff:/var/lib/docker/overlay2/0qk9ttjn3sb7rxeodob5jzz56/diff:/var/lib/docker/overlay2/mbn5z8cbravady3gbxxiiz1o3/diff:/var/lib/docker/overlay2/m5sy77lv0hx174leuwph4cur9/diff:/var/lib/docker/overlay2/
    xoduxsvqanfcqtslbrg9h8yhr/diff:/var/lib/docker/overlay2/iaz560jgy82h19yu90rx306fq/diff:/var/lib/docker/overlay2/5s7c5oewjokbz9rurjbblot7d/diff:/var/lib/docker/overlay2/w4tdb454q8ea7e8jqncgf1niz/diff:/var/lib/docker/overlay2/oe8erdwa5qxno1yziaxvm04co/diff:/var/lib/do
    cker/overlay2/pgz4zzrzgzitkxfuf3ltb70c7/diff:/var/lib/docker/overlay2/bh8yjz7tw37bwmoqh00eomzv2/diff:/var/lib/docker/overlay2/8hnkievuc1hwtpefz9jo1hoa1/diff:/var/lib/docker/overlay2/yr9r7pz5o9wqt107vh83rvkgl/diff:/var/lib/docker/overlay2/lhouwzl318xp18yfwxvr4sd2s/di
    ff:/var/lib/docker/overlay2/gitzfx95l7qafvdy2hno090ez/diff:/var/lib/docker/overlay2/rs73vlda9q4b8dh3fel5q5rjw/diff:/var/lib/docker/overlay2/jbwiofn61os2kf1xu62mw0m2r/diff:/var/lib/docker/overlay2/19mzqq0hcgp95fdnx7sdvr1en/diff:/var/lib/docker/overlay2/jc4hka9y40l6bz
    siv518w5a8e/diff:/var/lib/docker/overlay2/3g676x909z053yqprxzu5ptp1/diff:/var/lib/docker/overlay2/4ejytgdjw0vvq6kzaj4cvyknc/diff:/var/lib/docker/overlay2/ppgpp2l7i8msuezj3549rg8na/diff:/var/lib/docker/overlay2/th6xabclhbvlpeb0rmm2g0iz9/diff:/var/lib/docker/overlay2/
    s4u979omlc9yzdg1shsk80fjj/diff:/var/lib/docker/overlay2/p0xp6qh1ddtns3kwiqtgu0qgg/diff:/var/lib/docker/overlay2/0zfv40b9uy2jz21cgctkxplbm/diff:/var/lib/docker/overlay2/xidwpwl4t8ejqhec07j4nvlb1/diff:/var/lib/docker/overlay2/s88e5dfz1gl7oxc7sg1se60bf/diff:/var/lib/docker/overlay2/yp83xmtwn4mbvpisw3i0sx2r8/diff:/var/lib/docker/overlay2/wb39h5nb6g33ue9n5yh1e4hau/diff:/var/lib/docker/overlay2/2f2b4c28faa8f9ae309c9e2c5c0478078f290a674dc2a8248a8486a485667361/diff",
                    "MergedDir": "/var/lib/docker/overlay2/d14231cead21e84ac9a2d840404d84e105be372f1945dc5311bda7f3aeb9be58/merged",
                    "UpperDir": "/var/lib/docker/overlay2/d14231cead21e84ac9a2d840404d84e105be372f1945dc5311bda7f3aeb9be58/diff",
                    "WorkDir": "/var/lib/docker/overlay2/d14231cead21e84ac9a2d840404d84e105be372f1945dc5311bda7f3aeb9be58/work"
                },
                "Name": "overlay2"
            },
            "Mounts": [
                {
                    "Type": "bind",
                    "Source": "C:/PROJECT/PHPSTORM/OWN/project-name",
                    "Destination": "/var/www/project-name",
                    "Mode": "rw",
                    "RW": true,
                    "Propagation": "rprivate"
                }
            ],
            "Config": {
                "Hostname": "4c3ba5bf5401",
                "Domainname": "",
                "User": "",
                "AttachStdin": false,
                "AttachStdout": true,
                "AttachStderr": true,
                "ExposedPorts": {
                    "443/tcp": {},
                    "80/tcp": {}
                },
                "Tty": false,
                "OpenStdin": false,
                "StdinOnce": false,
                "Env": [
                    "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                    "RUNNING_IN_DOCKER=true",
                    "DEBCONF_NONINTERACTIVE_SEEN=true",
                    "DEBIAN_FRONTEND=noninteractive"
                ],
                "Cmd": null,
                "Image": "project-name_server",
                "Volumes": {
                    "/var/www/project-name": {}
                },
                "WorkingDir": "/var/www/project-name",
                "Entrypoint": [
                    "tail",
                    "-f",
                    "/dev/null"
                ],
                "OnBuild": null,
                "Labels": {
                    "com.docker.compose.config-hash": "fe7472b5b21fbbfcf5e67205e073e701c50042a8ecfafdcb5a180666456d901d",
                    "com.docker.compose.container-number": "1",
                    "com.docker.compose.depends_on": "",
                    "com.docker.compose.image": "sha256:335b2506fd56c9f806e6a2316bd5a594c16bf790a5e802e6e23349ea286fd428",
                    "com.docker.compose.oneoff": "False",
                    "com.docker.compose.project": "project-name",
                    "com.docker.compose.project.config_files": "C:\\PROJECT\\PHPSTORM\\OWN\\project-name\\docker-compose.yml",
                    "com.docker.compose.project.working_dir": "C:\\PROJECT\\PHPSTORM\\OWN\\project-name",
                    "com.docker.compose.service": "server",
                    "com.docker.compose.version": "2.5.1"
                }
            },
            "NetworkSettings": {
                "Bridge": "",
                "SandboxID": "d0e4e1b6f76b3afd898e033d54a17f5c9ac7c31944b07e6e991ea36a7a938d1c",
                "HairpinMode": false,
                "LinkLocalIPv6Address": "",
                "LinkLocalIPv6PrefixLen": 0,
                "Ports": {
                    "443/tcp": [
                        {
                            "HostIp": "0.0.0.0",
                            "HostPort": "443"
                        }
                    ],
                    "80/tcp": [
                        {
                            "HostIp": "0.0.0.0",
                            "HostPort": "80"
                        }
                    ]
                },
                "SandboxKey": "/var/run/docker/netns/d0e4e1b6f76b",
                "SecondaryIPAddresses": null,
                "SecondaryIPv6Addresses": null,
                "EndpointID": "",
                "Gateway": "",
                "GlobalIPv6Address": "",
                "GlobalIPv6PrefixLen": 0,
                "IPAddress": "",
                "IPPrefixLen": 0,
                "IPv6Gateway": "",
                "MacAddress": "",
                "Networks": {
                    "project-name_default": {
                        "IPAMConfig": null,
                        "Links": null,
                        "Aliases": [
                            "project-name--server",
                            "server",
                            "4c3ba5bf5401"
                        ],
                        "NetworkID": "9059566afbf1f4161041f54776eca8e0c71ba33d587d63ca30d64decfd0eb716",
                        "EndpointID": "92b653a8dca981715393c9d04e6e410dd182b61c761c7931a2ef89dcda390b1c",
                        "Gateway": "172.21.0.1",
                        "IPAddress": "172.21.0.2",
                        "IPPrefixLen": 16,
                        "IPv6Gateway": "",
                        "GlobalIPv6Address": "",
                        "GlobalIPv6PrefixLen": 0,
                        "MacAddress": "02:42:ac:15:00:02",
                        "DriverOpts": null
                    }
                }
            }
        }
    ]

    La commande suivante indique bien que mes ports 80 et 443 sont ouvert et utilisés par apache (netstat -nlp | grep 443 et netstat -nlp | grep 80)
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      187/apache2
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      187/apache2


    Alors que c'est que j'ai bien pu loupé au juste d'après-vous ?

    Merci de votre aide éventuel...

  2. #2
    Membre émérite
    Avatar de cavo789
    Homme Profil pro
    Développeur Web
    Inscrit en
    Mai 2004
    Messages
    1 755
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Belgique

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Mai 2004
    Messages : 1 755
    Points : 2 986
    Points
    2 986
    Par défaut
    Bonjour

    La semaine dernière je donnais une conférence sur Docker lors du JoomlaDay qui s'est tenu à Bruxelles. Tu trouveras mes slides ci-après : https://docker.avonture.be/

    La première partie concerne l'utilisation d'une image PHP où je montre comment utiliser un script PHP. Cela pourrait peut-être te donner les premières bases ? C'est hyper simple, juste http et non https mais peut-être cela te permettra de lever le problème que tu rencontres.
    Christophe (cavo789)
    Mon blog, on y parle Docker, PHP, WSL, Markdown et plein d'autres choses : https://www.avonture.be

Discussions similaires

  1. [WS 2008 R2] Aide sur mise en place cohérente d'un domaine
    Par richard_sraing dans le forum Windows Serveur
    Réponses: 5
    Dernier message: 22/11/2013, 11h27
  2. Bloqué sur mise en place d'un critère
    Par majothi dans le forum Requêtes et SQL.
    Réponses: 5
    Dernier message: 21/02/2009, 14h48
  3. session sur mise en place du tuto de panier
    Par kosmos-guru dans le forum Langage
    Réponses: 8
    Dernier message: 13/08/2008, 17h55
  4. Aide sur mise en place d'un serveur
    Par toutouyoutour81 dans le forum Réseau
    Réponses: 3
    Dernier message: 24/08/2006, 11h19
  5. Réponses: 4
    Dernier message: 07/01/2006, 22h56

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo