<p>I am trying a very simple tutorial explaining how convert  docker-compose to minishift ( <a href="https://kompose.io/getting-started/" rel="nofollow noreferrer">Minishift and Kompose</a>. I tried to converted and push the docker-compose.yml example</p>

<pre><code>version: "2"

services:

  redis-master:
    image: k8s.gcr.io/redis:e2e 
    ports:
      - "6379"

  redis-slave:
    image: gcr.io/google_samples/gb-redisslave:v1
    ports:
      - "6379"
    environment:
      - GET_HOSTS_FROM=dns

  frontend:
    image: gcr.io/google-samples/gb-frontend:v4
    ports:
      - "80:80"
    environment:
      - GET_HOSTS_FROM=dns
    labels:
      kompose.service.type: LoadBalancer
</code></pre>

<p>I successfully compose and push as I can see from these logs:</p>

<pre><code>C:\Users\Cast\docker-compose-to-minishift&gt;kompose-windows-amd64 up --provider=openshift
[36mINFO[0m We are going to create OpenShift DeploymentConfigs, Services and PersistentVolumeClaims for your Dockerized application.
If you need different kind of resources, use the 'kompose convert' and 'oc create -f' commands instead.

[36mINFO[0m Deploying application in "myproject" namespace
[36mINFO[0m Successfully created Service: frontend
[36mINFO[0m Successfully created Service: redis-master
[36mINFO[0m Successfully created Service: redis-slave
[36mINFO[0m Successfully created DeploymentConfig: frontend
[36mINFO[0m Successfully created ImageStream: frontend
[36mINFO[0m Successfully created DeploymentConfig: redis-master
[36mINFO[0m Successfully created ImageStream: redis-master
[36mINFO[0m Successfully created DeploymentConfig: redis-slave
[36mINFO[0m Successfully created ImageStream: redis-slave

Your application has been deployed to OpenShift. You can run 'oc get dc,svc,is,pvc' for details.

C:\Users\Cast\docker-compose-to-minishift&gt;oc get dc
NAME           REVISION   DESIRED   CURRENT   TRIGGERED BY
frontend       0          1         0         config,image(frontend:v4)
redis-master   1          1         1         config,image(redis-master:e2e)
redis-slave    1          1         1         config,image(redis-slave:v1)
</code></pre>

<p>Nevertheless, I couldn't reach the web application and looking at the logs I found "The container frontend is crashing frequently. It must wait before it will be restarted again" and clicking in details:</p>

<pre><code>AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.13. Set the 'ServerName' directive globally to suppress this message
(13)Permission denied: AH00072: make_sock: could not bind to address [::]:80
(13)Permission denied: AH00072: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
AH00015: Unable to open logs
</code></pre>

<p>Searching around I found someone suggestion to change from port 80 to some not root privileged port (eg. 8080). So I changed it in my docker-compose, deleted manualy  the namespace myproject, recreated it  in OpenShift Web Console and I tried to run once again. Exactly same exception with same message.              </p>

<p>In case it is relevant, I have another cmd window with </p>

<pre><code>C:\Users\Cast\docker-compose-to-minishift&gt;kubectl proxy --port=8080
Starting to serve on 127.0.0.1:8080
</code></pre>

<p>I am quite begginer on moving from docker-compose to minishift (first time using Kompose tool to be honest).</p>

<p>My main question: why I still get same issue if I have alread changed the ports from 80:80 to 8080:8080 in docker-compose</p>

<pre><code>  frontend:
    image: gcr.io/google-samples/gb-frontend:v4
    ports:
      - "8080:8080"
</code></pre>

<p>Secondary question: what I have to check to see why I can't start the pront-end service? It is quite limited the exception provided. </p>

<p>*** edited</p>

<p>converted docker-compose by kompose (only front-end files)</p>

<p>frontend-imagestream</p>

<pre><code>apiVersion: v1
kind: ImageStream
metadata:
  creationTimestamp: null
  labels:
    io.kompose.service: frontend
  name: frontend
spec:
  tags:
  - annotations: null
    from:
      kind: DockerImage
      name: gcr.io/google-samples/gb-frontend:v4
    generation: null
    importPolicy: {}
    name: v4
status:
  dockerImageRepository: ""
</code></pre>

<p>frontend-service</p>

<pre><code>apiVersion: v1
kind: Service
metadata:
  annotations:
    kompose.cmd: C:\tools\kompose-windows-amd64.exe convert --provider=openshift
    kompose.service.type: LoadBalancer
    kompose.version: 1.19.0 (f63a961c)
  creationTimestamp: null
  labels:
    io.kompose.service: frontend
  name: frontend
spec:
  ports:
  - name: "8080"
    port: 8080
    targetPort: 8080
  selector:
    io.kompose.service: frontend
  type: LoadBalancer
status:
  loadBalancer: {}
</code></pre>

<p>frontend-deploymentconfig</p>

<pre><code>apiVersion: v1
kind: DeploymentConfig
metadata:
  annotations:
    kompose.cmd: C:\tools\kompose-windows-amd64.exe convert --provider=openshift
    kompose.service.type: LoadBalancer
    kompose.version: 1.19.0 (f63a961c)
  creationTimestamp: null
  labels:
    io.kompose.service: frontend
  name: frontend
spec:
  replicas: 1
  selector:
    io.kompose.service: frontend
  strategy:
    resources: {}
  template:
    metadata:
      creationTimestamp: null
      labels:
        io.kompose.service: frontend
    spec:
      containers:
      - env:
        - name: GET_HOSTS_FROM
          value: dns
        image: ' '
        name: frontend
        ports:
        - containerPort: 8080
        resources: {}
      restartPolicy: Always
  test: false
  triggers:
  - type: ConfigChange
  - imageChangeParams:
      automatic: true
      containerNames:
      - frontend
      from:
        kind: ImageStreamTag
        name: frontend:v4
    type: ImageChange
status: {}
</code></pre>

<p>Added all logs (I removed Redis and left only FrontEnd service since it was the only causing issue):</p>

<pre><code>Windows PowerShell
Copyright (C) Microsoft Corporation. Todos os direitos reservados.

Experimente a nova plataforma cruzada PowerShell https://aka.ms/pscore6

PS C:\Windows\system32&gt; cd C:\to_learn\docker-compose-to-minishift\first-try
PS C:\to_learn\docker-compose-to-minishift\first-try&gt; kompose-windows-amd64 up --provider=openshift
[36mINFO[0m We are going to create OpenShift DeploymentConfigs, Services and PersistentVolumeClaims for your Dockerized application.
If you need different kind of resources, use the 'kompose convert' and 'oc create -f' commands instead.

[36mINFO[0m Deploying application in "myproject" namespace
[36mINFO[0m Successfully created Service: frontend
[36mINFO[0m Successfully created DeploymentConfig: frontend
[36mINFO[0m Successfully created ImageStream: frontend

Your application has been deployed to OpenShift. You can run 'oc get dc,svc,is,pvc' for details.
PS C:\to_learn\docker-compose-to-minishift\first-try&gt; oc expose service/frontend
route.route.openshift.io/frontend exposed
PS C:\to_learn\docker-compose-to-minishift\first-try&gt; minishift openshift service frontend --namespace=myproject
|-----------|----------|----------------------|-------------------------------------------------|--------|
| NAMESPACE |   NAME   |       NODEPORT       |                    ROUTE-URL                    | WEIGHT |
|-----------|----------|----------------------|-------------------------------------------------|--------|
| myproject | frontend | 192.168.99.101:30215 | http://frontend-myproject.192.168.99.101.nip.io |        |
|-----------|----------|----------------------|-------------------------------------------------|--------|
PS C:\to_learn\docker-compose-to-minishift\first-try&gt;
</code></pre>

<p>And when I try to open <a href="http://frontend-myproject.192.168.99.101.nip.io" rel="nofollow noreferrer">http://frontend-myproject.192.168.99.101.nip.io</a> in Chrome:</p>

<pre><code>Application is not available
The application is currently not serving requests at this endpoint. It may not have been started or is still starting.
...
</code></pre>

<p>Edited (trying deploying another sample application)</p>

<pre><code>PS C:\to_learn\docker-compose-to-minishift\first-try&gt;  nslookup x.127.0.0.1.xip.io
Servidor:  one.one.one.one
Address:  1.1.1.1

Não é resposta autoritativa:
Nome:    x.127.0.0.1.xip.io
Address:  127.0.0.1

PS C:\to_learn\docker-compose-to-minishift\first-try&gt; oc version
oc v3.11.0+0cbc58b
kubernetes v1.11.0+d4cacc0
features: Basic-Auth SSPI Kerberos SPNEGO

Server https://192.168.99.101:8443
kubernetes v1.11.0+d4cacc0
PS C:\to_learn\docker-compose-to-minishift\first-try&gt;  oc new-app --name='cotd' --labels name='cotd' php~https://github.com/devopswith-openshift/cotd.git -e SELECTOR=cats
--&gt; Found image dc5aa55 (2 months old) in image stream "openshift/php" under tag "7.1" for "php"

    Apache 2.4 with PHP 7.1
    -----------------------
    PHP 7.1 available as container is a base platform for building and running various PHP 7.1 applications and frameworks. PHP is an HTML-embedded scripting language. PHP attempts to make it easy for developers to write dynamically generated web pages. PHP also offers built-in database integration for several commercial and non-commercial database management systems, so writing a database-enabled webpage with PHP is fairly simple. The most common use of PHP coding is probably as a replacement for CGI scripts.

    Tags: builder, php, php71, rh-php71

    * A source build using source code from https://github.com/devopswith-openshift/cotd.git will be created
      * The resulting image will be pushed to image stream tag "cotd:latest"
      * Use 'start-build' to trigger a new build
    * This image will be deployed in deployment config "cotd"
    * Ports 8080/tcp, 8443/tcp will be load balanced by service "cotd"
      * Other containers can access this service through the hostname "cotd"

--&gt; Creating resources with label name=cotd ...
    imagestream.image.openshift.io "cotd" created
    buildconfig.build.openshift.io "cotd" created
    deploymentconfig.apps.openshift.io "cotd" created
    service "cotd" created
--&gt; Success
    Build scheduled, use 'oc logs -f bc/cotd' to track its progress.
    Application is not exposed. You can expose services to the outside world by executing one or more of the commands below:
     'oc expose svc/cotd'
    Run 'oc status' to view your app.
PS C:\to_learn\docker-compose-to-minishift\first-try&gt; oc expose svc/cotd
route.route.openshift.io/cotd exposed
PS C:\to_learn\docker-compose-to-minishift\first-try&gt; oc status
In project myproject on server https://192.168.99.101:8443

http://cotd-myproject.192.168.99.101.nip.io to pod port 8080-tcp (svc/cotd)
  dc/cotd deploys istag/cotd:latest &lt;-
    bc/cotd source builds https://github.com/devopswith-openshift/cotd.git on openshift/php:7.1
      build #1 pending for 11 minutes
    deployment #1 waiting on image or update

http://frontend-myproject.192.168.99.101.nip.io to pod port 8080 (svc/frontend)
  dc/frontend deploys istag/frontend:v4
    deployment #1 waiting on image or update


4 infos identified, use 'oc status --suggest' to see details.
PS C:\to_learn\docker-compose-to-minishift\first-try&gt; oc status --suggest
In project myproject on server https://192.168.99.101:8443

http://cotd-myproject.192.168.99.101.nip.io to pod port 8080-tcp (svc/cotd)
  dc/cotd deploys istag/cotd:latest &lt;-
    bc/cotd source builds https://github.com/devopswith-openshift/cotd.git on openshift/php:7.1
      build #1 pending for 12 minutes
    deployment #1 waiting on image or update

http://frontend-myproject.192.168.99.101.nip.io to pod port 8080 (svc/frontend)
  dc/frontend deploys istag/frontend:v4
    deployment #1 waiting on image or update

Info:
  * dc/cotd has no readiness probe to verify pods are ready to accept traffic or ensure deployment is successful.
    try: oc set probe dc/cotd --readiness ...
  * dc/cotd has no liveness probe to verify pods are still running.
    try: oc set probe dc/cotd --liveness ...
  * dc/frontend has no readiness probe to verify pods are ready to accept traffic or ensure deployment is successful.
    try: oc set probe dc/frontend --readiness ...
  * dc/frontend has no liveness probe to verify pods are still running.
    try: oc set probe dc/frontend --liveness ...

View details with 'oc describe &lt;resource&gt;/&lt;name&gt;' or list everything with 'oc get all'.
PS C:\to_learn\docker-compose-to-minishift\first-try&gt;
</code></pre>

<p>Build Pending Status</p>

<p><a href="https://i.stack.imgur.com/2EP88.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2EP88.png" alt="cotd-myproject"></a></p>

<p>It happens when you use a non-root container like bitnami official images.</p>

<p>We used <strong>user:root</strong> and <strong>network_mode: host</strong> when it needs to get bind with <strong>host network</strong>.</p>

<pre><code>  apache:
    image: bitnami/apache:2.4
    container_name: "apache"
    ports:
      - 80:80
    network_mode: host
    privileged: true
    user: root
    environment:
      DOCKER_HOST: "unix:///var/run/docker.sock"
    env_file:
      - .env
    volumes:
      - ./setup/apache/httpd.conf:/opt/bitnami/apache/conf/httpd.conf
</code></pre>
