How to build a Docker base image from scratch

0 votes

Currently I use:

docker pull microsoft/windowsservercore

to pull a base image. But I want to make my own base image. How can I do that?

Sep 27, 2018 in DevOps & Agile by Sophie may
• 10,620 points
1,603 views

1 answer to this question.

0 votes

There are many ways to build a base image. You can use tar or scratch

Refer the example below or look up docker’s official website, you might find something there.

FROM scratch
ADD helloworld.sh /usr/local/bin/hellowworld.sh
CMD ["/usr/local/bin/helloworld.sh"]
answered Sep 27, 2018 by Tyrion anex
• 8,700 points

Related Questions In DevOps & Agile

+1 vote
2 answers

How do I run Apache server from Docker without mapping to a location?

If you're seeing a 500 error, that's ...READ MORE

answered Oct 18, 2018 in DevOps & Agile by lina
• 8,220 points
2,223 views
0 votes
1 answer

How do I push a docker image to a private repository?

Here is what you can do. Just try ...READ MORE

answered Sep 19, 2018 in DevOps & Agile by Damon Salvatore
• 5,980 points
1,407 views
0 votes
0 answers

How to generate a list of every external URL accessed during docker build?

Is there an easy method to create ...READ MORE

Mar 16, 2023 in DevOps & Agile by Edureka
• 12,690 points
376 views
+3 votes
4 answers

Unable to build docker image

It looks like the dev dependencies were ...READ MORE

answered Oct 11, 2018 in DevOps & Agile by lina
• 8,220 points

edited Oct 17, 2018 by lina 5,855 views
+2 votes
1 answer
+2 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 58,020 points
2,738 views
0 votes
1 answer

How to a run deployed app in Docker for Windows?

To deploy an ASP.NET web application to ...READ MORE

answered Aug 30, 2018 in DevOps & Agile by Tyrion anex
• 8,700 points
1,230 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP