我新與碼頭工人,並希望對外部IP安裝nginx
我的容器內進行重定向泊塢窗安裝nginx的
我的目標是發送請求http://localhost:3010/api/v1/service
內泊塢窗,它應該我重定向到我http://192.168.99.1:3010/api/v1/service
http://192.168.99.1:3010 -it my rails server running
或者,也許我完全錯了我的想法?
我嘗試做RUN yum install nginx
但我有
ERROR: Service 'my_service_name' failed to build: The command '/bin/sh -c yum install nginx' returned a non-zero code: 1
dockerfile
FROM jboss/wildfly:latest
USER root
ENV TERM dumb
RUN yum -y install wget && \
wget https://github.com/papertrail/remote_syslog2/releases/download/v0.15/remote_syslog_linux_amd64.tar.gz && \
tar xzf ./remote_syslog*.tar.gz && \
cd remote_syslog && \
cp ./remote_syslog /usr/local/bin && \
yum -y install postgresql && yum clean all
ADD customization/DigiCertCA.pem /etc/pki/ca-trust/source/anchors/DigiCertCA.pem
RUN update-ca-trust extract
# install nginx
RUN yum install nginx
# Copy a configuration file from the current directory
ADD nginx.conf /etc/nginx/
# Set the default command to execute when creating a new container
CMD service nginx start
CMD ["find/-type f -exec ls -l {} \;"]
CMD ["chmod 666 customization/*.properties"]
ADD customization /opt/jboss/wildfly/customization/
COPY customization/WebService.* /opt/jboss/wildfly/standalone/deployments/
ADD newrelic /opt/jboss/wildfly/newrelic/
CMD ["/opt/jboss/wildfly/customization/execute.sh"]
EXPOSE 8080
你的基本圖像是什麼?你能發佈你的整個dockerfile嗎? –
@YaronIdan新增 – user
還有你可以使用的[官方圖片](https://hub.docker.com/_/nginx/)。你可以擴展它並添加你自己的配置文件,並且很好。 – R0MANARMY