Template and example for new container repositories.
1.3K
Template and example for new container repositories.
Starting with containers can be intense and working towards best-practices is often taking a lot of time. This learning can be a lot easier, if a project is providing some pracices on its own and guiding new developers.
The code in this repository is not intended to be used directly. Instead, it is providing some common scenarios and examples that may be handy, if one wants to develop containers.
The container template can be used with Docker, Podman or similar container engines and container orchestration. You will also find the container images in our Docker Hub organization.
You can run the image with a simple command.
# with Podman
$ podman container run -dt -p 8080:80 docker.io/whiletruedoio/template:latest
# with Docker
$ docker container run -dt -p 8080:80 docker.io/whiletruedoio/template:latest
Afterwards, you can check the website content via CLI or in your browser, pointing to http://localhost:8080.
# Check via curl
$ curl localhost:8080
<!DOCTYPE html>
<html>
<head>
<!-- meta -->
<meta charset="utf-8" />
...SNIP...
</footer>
</body>
</html>
To build the image on your own, you will need the repository first.
# Clone
$ git clone https://github.com/whiletruedoio/container-template.git
# Change into directory
$ cd container-template
Now you can make changes to the files or just build the image on your own.
# with Podman
$ podman image build \
--tag docker.io/whiletruedoio/template:latest container/
# with Docker
$ docker image build \
--tag docker.io/whiletruedoio/template:latest container/
Afterwards, you can run it the same way as described in the above section.
The Kubernetes example demonstrates the usage of Kubernetes deployments and scenarios. All of them can be used on a k3s cluster without any further tuning.
TODO: kubernetes deployment and documentation
Thank you so much for considering to contribute! We are happy, when someone is joining the hard work.
Issues and Pull Requests are handled on a regular basis. Please be aware, that we may reach out to you, ask you to provide additional resources or want to discuss the issue a little, before planning it.
Providing code to this repository is pretty straight forward. Open an issue, so we can discuss the bug/feature and start working on it afterwards. You just need to open the pull request afterwards and that's it.
It is also strongly recommended to read the Contribution Guideline beforehand.
We are maintaining a changelog for repositories. Normally, the developers will update the changelog, according to keepachangelog.com.
To ensure a high quality and functionality, we want to carefully test our software. The provided code is automatically tested as described in the .cirrus.yml.
Except otherwise noted, all work is licensed under a BSD-3-Clause License.
Please feel free to reach out to us and the community. We also recommend to read and understand the Code of Conduct beforehand.
Content type
Image
Digest
Size
4.8 MB
Last updated
over 4 years ago
docker pull whiletruedoio/template