Build and publish a docker image to docker hub

  • fennng 
To build a docker image, you only need a single docker file
From microsoft/aspnetcore:2.0
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install zip socat supervisor
RUN mkdir /app
COPY /app
RUN cd app && unzip /app/
RUN rm /app/
EXPOSE 8801 8866 8855 8877
ADD supervisord.conf /etc/supervisor/conf.d/supervisord.conf 
ENTRYPOINT [“/usr/bin/supervisord”]
In this docker file, I created a new image based on  microsoft/aspnetcore:2.0
And I copied  FiddlerOrchestra app into the image for running.
I used  supervisor to run two tasks
The content of  supervisord.conf:
command=socat TCP4-LISTEN:8801,fork TCP4:localhost:8800
command=dotnet /app/FiddlerOrchestra.Client.NetCore.dll
Once you’ve got this ready, you can simply build the docker image with a single command.
docker build .
Once built, you can publish it to Docker Hub. You will need to create an account first.
docker login –username=fennng


docker tag fiddler-orchestra fennng/fiddler-orchestra:1.0
docker push fennng/fiddler-orchestra



您的电子邮箱地址不会被公开。 必填项已用*标注