---
title: "Fly Friday - Customizing with Dockerfiles"
description: "Fly Friday describes how to customize a Docker image before deploying it to Fly, building on an earlier example that deployed Docker’s official httpd image. The default image serves files from /usr/local/apache2/html and displays “It works”; replacing that content requires adding local HTML files to the image. A two-line Dockerfile uses FROM httpd:2.4 as the base and COPY ./public_html/ /usr/local/apache2/htdocs/ to place the contents of a public_html directory into the new image, which Fly then deploys. The post also notes that the directory must be created and populated with HTML, and points to a video and Fly Docs, including a hands-on path to a free account and first app deployment."
---

# Fly Friday - Customizing with Dockerfiles

[Fly.io](https://yomu.fyi/company/fly-io) · Feb 21, 2020

**Type:** Tutorial

## Summary

Fly Friday describes how to customize a Docker image before deploying it to Fly, building on an earlier example that deployed Docker’s official httpd image. The default image serves files from /usr/local/apache2/html and displays “It works”; replacing that content requires adding local HTML files to the image. A two-line Dockerfile uses FROM httpd:2.4 as the base and COPY ./public\_html/ /usr/local/apache2/htdocs/ to place the contents of a public\_html directory into the new image, which Fly then deploys. The post also notes that the directory must be created and populated with HTML, and points to a video and Fly Docs, including a hands-on path to a free account and first app deployment.

## Context

The deployed Docker httpd image displays “It works” by default, so different content requires copying local HTML files into the image’s serving directory.

## Approach / What changed

Create a public\_html directory with HTML content and use a two-line Dockerfile based on httpd:2.4. The Dockerfile copies that directory into the new image, which Fly deploys.

## Takeaways

- The Dockerfile uses FROM httpd:2.4 to build a customized image from Docker’s official httpd image.
- COPY ./public\_html/ /usr/local/apache2/htdocs/ transfers the local HTML content into the new image.
- The public\_html directory must be created and populated before the customized image is deployed.

**Tags:** [Docker](https://yomu.fyi/topic/docker), [Fly.io](https://yomu.fyi/topic/fly-io)

- Source: [Fly.io](https://fly.io/blog/fly-friday-customizing-with-dockerfiles)
- Source URL: https://fly.io/blog/fly-friday-customizing-with-dockerfiles
- Ingested by Yomu: 2026-09-03T01:26:02.661Z

[Read original post](https://fly.io/blog/fly-friday-customizing-with-dockerfiles)
