Skip to content

Commit

Permalink
switch to Alpine based image, make Dev Containers new default (#34)
Browse files Browse the repository at this point in the history
- update README
- add CONTRIBUTING instructions
  • Loading branch information
nicbet authored Dec 5, 2022
1 parent 1d570c1 commit 8b00155
Show file tree
Hide file tree
Showing 12 changed files with 197 additions and 95 deletions.
8 changes: 0 additions & 8 deletions .devcontainer/Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"forwardPorts": [4000],
"shutdownAction": "stopCompose",
"extensions": [
"mjmcloug.vscode-elixir",
"jakebecker.elixir-ls",
"florinpatrascu.vscode-elixir-snippets",
"phoenixframework.phoenix"
],
}
4 changes: 2 additions & 2 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
app:
build:
context: ../
dockerfile: .devcontainer/Dockerfile
dockerfile: Dockerfile
command: sleep infinity
environment:
- PORT=4000
Expand All @@ -16,7 +16,7 @@ services:
# should match should match what your application expects. In this case, the
# compose file is in a sub-folder, so we will mount '..'. We'll then reference this
# as the workspaceFolder in '.devcontainer/devcontainer.json' so VS Code starts here.
- ..:/app:cached
- ../app:/app:cached

# This lets you avoid setting up Git again in the container
- ~/.gitconfig:/root/.gitconfig
Expand Down
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.elixir_ls
.vscode
.github
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.vscode
.elixir_ls
tags
/src
/app
76 changes: 76 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Accepting constructive criticism with grace
- Focusing on what's best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that aren't aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies within all project spaces, and it also applies when
an individual is representing the project or its community in public spaces.
Examples of representing a project or community include using an official
project e-mail address, posting via an official social media account, or acting
as an appointed representative at an online or offline event. Representation of
a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [email protected]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality regarding the reporter of an incident.
Further details of specific enforcement policies may be posted in other locations.

Project maintainers who don't follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [https://www.contributor-covenant.org/version/1/4/code-of-conduct.html](https://www.contributor-covenant.org/version/1/4/code-of-conduct.html)

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
[https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq)
49 changes: 49 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Contributing

_Docker Phoenix is intended to be a safe, welcoming space for collaboration. By participating you agree to abide by the [Contributor Code of Conduct](CODE_OF_CONDUCT.md)._

Hi there! We're thrilled that you'd like to contribute to Docker Phoenix. Your help is essential for keeping it great!

If you have any substantial changes that you would like to make, please [open an issue](http://github.com/nicbet/docker-phoenix/issues/new) first to discuss them with us.

Maintainers tend to focus on areas of the project that are useful to them and their employers, but we're happy to pair with members of the community to enable work on other parts.

Contributions to this project are [released](https://help.github.com/articles/github-terms-of-service/#6-contributions-under-repository-license) to the public under the [GPLv3 license](https://github.com/nicbet/docker-phoenix/blob/main/LICENSE).

## Reporting bugs

When opening an issue to describe a bug, it's helpful to provide steps to reproduce it, either with failing tests in a pull request, or by sharing a repository that demonstrates the issue.

## Submitting a pull request

1. [Fork](https://github.com/nicbet/docker-phoenix/fork) and clone the repository.
2. Create a new branch: `git checkout -b my-branch-name`.
3. If it's your first time contributing, add yourself to the `Contributors` section of `README.md`.
4. Push to the fork and [submit a pull request](https://github.com/nicbet/docker-phoenix/compare).
5. Ensure you include a detailed description of your proposed changes.
6. Wait for the pull request to be reviewed and merged.
7. Be on the lookout for review comments and change requests, possibly requiring you to make additional changes to your pull request.

## Governance

Docker Phoenix is built by many members of the Open Source community. Project membership has several levels:

### Triage

Docker Phoenix **triagers** are able to manage issues and pull request by assigning owners and labels, closing issues and marking duplicates.

After helping with the project by participating in issues, pull requests, and/or discussions, members of the community are welcome to request triage access by opening a pull request to update this list.

### Commit

Docker Phoenix **committers** have `write` access, enabling them to push directly to the repository and merge pull requests, thus removing the need to contribute via a fork. Committers often have implicit ownership over a particular area of the project.

Triagers are welcome to request commit access by opening a pull request to update this list.

### Maintain

Docker Phoenix **maintainers** have `admin` access, enabling them to manage repository settings including access levels. Maintainers are required to have 2FA enabled for their GitHub and Docker Hub accounts.

Committers are welcome to request maintainership access by opening a pull request to update this list:

The maintainers team currently consists of: @nicbet.
11 changes: 3 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
FROM elixir:1.14.1
FROM elixir:1.14.1-alpine

# Build Args
ARG PHOENIX_VERSION=1.6.15
ARG NODEJS_VERSION=18.x

# Apt
RUN apt-get update && apt-get upgrade -y && apt-get install -y apt-utils build-essential inotify-tools

# Nodejs
RUN curl -sL https://deb.nodesource.com/setup_${NODEJS_VERSION} | bash
RUN apt-get install -y nodejs
# Apk
RUN apk add bash git inotify-tools nodejs-current npm yarn

# Phoenix
RUN mix local.hex --force
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OWNER = nicbet
IMAGE = phoenix
TAG = $(OWNER)/$(IMAGE)
VERSION = 1.6.15
VERSION = 1.6.15-alpine

all: test

Expand Down
Loading

0 comments on commit 8b00155

Please sign in to comment.