Skip to content
This repository has been archived by the owner on Sep 22, 2023. It is now read-only.

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
itsmostafa committed Feb 1, 2023
1 parent b1e1739 commit ff8d697
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 97 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ ENV DEPS \
RUN apk --no-cache --quiet add ${DEPS}

# Install Con-PCA-Tasks binary file
RUN wget https://github.com/cisagov/con-pca-tasks/releases/download/v0.0.1/pca-linux-amd64
RUN wget https://github.com/cisagov/con-pca-tasks/releases/download/latest/pca-linux-amd64
RUN mv pca-linux-amd64 /bin/pca

RUN ["chmod", "+x", "/bin/pca"]
Expand Down
108 changes: 12 additions & 96 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# con-pca-tasks-docker 💀🐳 #
# Con-PCA Tasks Docker 🐳 #

[![GitHub Build Status](https://github.com/cisagov/con-pca-tasks-docker/workflows/build/badge.svg)](https://github.com/cisagov/con-pca-tasks-docker/actions/workflows/build.yml)
[![CodeQL](https://github.com/cisagov/con-pca-tasks-docker/workflows/CodeQL/badge.svg)](https://github.com/cisagov/con-pca-tasks-docker/actions/workflows/codeql-analysis.yml)
Expand All @@ -10,94 +10,26 @@
[![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/cisagov/example)](https://hub.docker.com/r/cisagov/example)
[![Platforms](https://img.shields.io/badge/platforms-amd64%20%7C%20arm%2Fv6%20%7C%20arm%2Fv7%20%7C%20arm64%20%7C%20ppc64le%20%7C%20s390x-blue)](https://hub.docker.com/r/cisagov/con-pca-tasks-docker/tags)

This is a Docker skeleton project that can be used to quickly get a
new [cisagov](https://github.com/cisagov) GitHub Docker project
started. This skeleton project contains [licensing
information](LICENSE), as well as [pre-commit hooks](https://pre-commit.com)
and [GitHub Actions](https://github.com/features/actions) configurations
appropriate for Docker containers and the major languages that we use.
This project's purpose is to containerize [Con-PCA-Tasks](https://github.com/cisagov/con-pca-tasks)
project as part of our cicd pipeline.

## Running ##

### Running with Docker ###
## Related Con-PCA Repositories ##

To run the `cisagov/example` image via Docker:
- [con-pca-api](https://github.com/cisagov/con-pca-api)
- [con-pca-cicd](https://github.com/cisagov/con-pca-cicd)
- [con-pca-web](https://github.com/cisagov/con-pca-web)
- [con-pca-tasks](https://github.com/cisagov/con-pca-web)

```console
docker run cisagov/example:0.0.1
```
## Running ##

### Running with Docker Compose ###

1. Create a `docker-compose.yml` file similar to the one below to use [Docker Compose](https://docs.docker.com/compose/).

```yaml
---
version: "3.7"

services:
example:
image: cisagov/example:0.0.1
volumes:
- type: bind
source: <your_log_dir>
target: /var/log
environment:
- ECHO_MESSAGE="Hello from docker compose"
ports:
- target: 8080
published: 8080
protocol: tcp
```
1. Start the container and detach:

```console
docker compose up --detach
```

## Using secrets with your container ##

This container also supports passing sensitive values via [Docker
secrets](https://docs.docker.com/engine/swarm/secrets/). Passing sensitive
values like your credentials can be more secure using secrets than using
environment variables. See the
[secrets](#secrets) section below for a table of all supported secret files.

1. To use secrets, create a `quote.txt` file containing the values you want set:

```text
Better lock it in your pocket.
```

1. Then add the secret to your `docker-compose.yml` file:

```yaml
---
version: "3.7"
secrets:
quote_txt:
file: quote.txt
services:
example:
image: cisagov/example:0.0.1
volumes:
- type: bind
source: <your_log_dir>
target: /var/log
environment:
- ECHO_MESSAGE="Hello from docker compose"
ports:
- target: 8080
published: 8080
protocol: tcp
secrets:
- source: quote_txt
target: quote.txt
```

## Updating your container ##

### Docker Compose ###
Expand Down Expand Up @@ -161,34 +93,25 @@ The following ports are exposed by this container:

| Port | Purpose |
|------|----------------|
| 8080 | Example only; nothing is actually listening on the port |

The sample [Docker composition](docker-compose.yml) publishes the
exposed port at 8080.
| 8080 | Con-PCA Tasks |

## Environment variables ##

### Required ###

There are no required environment variables.
There are no required environment variables as of now.

<!--
| Name | Purpose | Default |
|-------|---------|---------|
| `REQUIRED_VARIABLE` | Describe its purpose. | `null` |
-->

### Optional ###

| Name | Purpose | Default |
|-------|---------|---------|
| `ECHO_MESSAGE` | Sets the message echoed by this container. | `Hello World from Dockerfile` |

## Secrets ##

| Filename | Purpose |
|--------------|---------|
| `quote.txt` | Replaces the secret stored in the example library's package data. |
| `quote.txt` | Replaces the secret stored in the library's package data. |

## Building from source ##

Expand Down Expand Up @@ -232,13 +155,6 @@ Docker:
--tag cisagov/example:0.0.1 .
```

## New repositories from a skeleton ##

Please see our [Project Setup guide](https://github.com/cisagov/development-guide/tree/develop/project_setup)
for step-by-step instructions on how to start a new repository from
a skeleton. This will save you time and effort when configuring a
new repository!

## Contributing ##

We welcome contributions! Please see [`CONTRIBUTING.md`](CONTRIBUTING.md) for
Expand Down

0 comments on commit ff8d697

Please # to comment.