Skip to content
This repository was archived by the owner on May 7, 2021. It is now read-only.
This repository was archived by the owner on May 7, 2021. It is now read-only.

Missing PROXY_PASS_URL stops nginx from starting #16

@nicolaiskogheim

Description

@nicolaiskogheim

This got long, sorry. I learned a lot while trying to formulate an issue I had while using your container, and in the end I guess my only request is to clarify in your README that it's essential that PROXY_PASS_URL is defined in the container. I'm not sure what value to give that variable, but I guess that's an unrelated topic.

I'll leave my original notes so I can reference it from relevant projects if need be.


Hi. I have been trying to figure out why the fabric8-ui container ((hub.docker.com/r/)fabric8/fabric8-ui:<any tag>) I ran never started. That container comes into existence via a a build process too complicated for me to understand where the issue is.

The issue manifests when nginx is starting with a config that has a syntax error:

2018/01/03 01:33:19 [emerg] 27#0:
invalid number of arguments in "set" directive in /etc/nginx/nginx.conf:78

The config that ends up in my container looks like this

#/etc/nginx/nginx.conf:78 in running container
        set $oso ;

I'm not too familiar with that nginx syntax, but that space looked suspicious. The line was introduced in ec6afb6 (3189e0e also relevant), and sure enough, there is a variable there that must have expanded to nothing somewhere.

#root/etc/nginx/nginx.conf:78 in this repo
        set $oso ${PROXY_PASS_URL};

I thought this line in your Dockerfile looked interesting, as it specifically mentions PROXY_PASS_URL

#Dockerfile:26
RUN sed -i "2s/^/\/template.sh \/usr\/share\/nginx\/html\nVARS='\$PROXY_PASS_URL' \/template.sh \/etc\/nginx\/nginx.conf  \n/" /run.sh

That line adds

/template.sh /usr/share/nginx/html
VARS='$PROXY_PASS_URL' /template.sh /etc/nginx/nginx.conf

to line 2 of the run.sh startup script that the base image provides, suggesting that your container should be run with the PROXY_PASS_URL environment variable.

I cannot figure out where the issue is. It may be with

Applying the manifests I mentioned does create a line in a config map that looks interesting, but it isn't given a value there. That config variable is, however, used in the fabric8-ui container (that builds on your image), so it looks to me as if that variable should have a value.

I tried finding out what fabric8io/gofabric8 did, because they use those manifests, but they don't have config in their deploy script regarding proxy pass for nginx as far as I could tell.


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions