You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
Hello @mjdall you don't need to setup NGINX for the API, NGINX is used for serving RPMs if you don't have a yum repo already or its performance is poor. I just updated the project and released a new binary. I've simplified your Dockerfile to use Ubuntu and yumapi binary only. Please let me know if you have any questions.
FROM ubuntu:16.04
WORKDIR /
RUN apt-get update -y
RUN apt-get install -y createrepo curl
RUN echo 'upload_dir: /opt/api' > /yumapi.yaml
RUN mkdir -p /opt/api
RUN curl -LO https://github.com/FINRAOS/yum-nginx-api/releases/download/0.3/yumapi
RUN chmod 0755 /yumapi
CMD /yumapi
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?
The text was updated successfully, but these errors were encountered: