FROM ubuntu:16.04
MAINTAINER morgan
WORKDIR /
RUN apt-get update -y
RUN apt-get install -y nginx git wget make gcc createrepo
RUN wget https://dl.google.com/go/go1.10.linux-amd64.tar.gz
RUN tar -xvf go1.10.linux-amd64.tar.gz
RUN mv go /usr/local
ENV GOROOT=/usr/local/go
ENV PATH=$GOPATH/bin:$GOROOT/bin:$PATH
RUN git clone https://github.com/FINRAOS/yum-nginx-api.git
WORKDIR /yum-nginx-api
RUN go get github.com/FINRAOS/yum-nginx-api
RUN go get github.com/go-ozzo/ozzo-routing
RUN go get github.com/h2non/filetype
RUN go get github.com/spf13/viper
RUN go get github.com/golang/gddo/httputil/header
RUN mv /etc/nginx/mime.types /etc/nginx/mime.types.bak
RUN mv ./nginx/mime.types /etc/nginx/mime.types
RUN mv /etc/nginx/nginx.conf /etc/nginx/nginx.conf.bak
RUN mv ./nginx/nginx.conf /etc/nginx/nginx.conf
COPY yumapi.yml .
RUN mkdir /opt/api
RUN make build
RUN yum-config-manager --enable /api/opt
CMD ./yumapi
CMD /etc/init.d/nginx start
EXPOSE 8080
So i'm setting up a docker container to host the binary so I can determine what needs to be installed a server i'm using to host an apt and yum repo. Don't really want to do it through a docker container since I already have a yum repo set up but currently dont have a clean way of calling create repo everytime something is posted. Hosting it with that dockerfile and fowarding 8080:8080 and then trying to access will result in a 502. What do you think I am doing wrong?