Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] init(dockerfile): add additional file #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions pre-commit.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Developer:
# ---------
# Name: Ron Green
#
# Description:
# -----------
# Bash Shell v.5 bats and deps for development
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as I said, lets just use the minimal dockerfile that you wrote for the pre-commit- no need for complicated stuff


FROM fedora

MAINTAINER Noah Gorny

ENV VERSION 0.2.0

# Optional Configuration Parameter
ARG SYSTEM_TZ

# Default Settings (for optional Parameter)
ENV SYSTEM_TZ ${SYSTEM_TZ:-Europe/Berlin}

ENV SERVICE_USER bashit
ENV SERVICE_HOME /home/${SERVICE_USER}

RUN dnf install --assumeyes \
ShellCheck \
golang \
pip \
python \
python-devel \
dumb-init \
&& \
dnf clean all
RUN pip3 install pre-commit

# Configure Go
RUN GO111MODULE=on go get mvdan.cc/sh/v3/cmd/shfmt && \
ln -s ~/bin/shfmt /usr/local/bin

# create a local user so we don't use ROOT
RUN adduser --home-dir=${SERVICE_HOME} --shell=/bin/bash -u 1000 ${SERVICE_USER} && \
cp /usr/share/zoneinfo/${SYSTEM_TZ} /etc/localtime && \
chown -R ${SERVICE_USER}:${SERVICE_USER} ${SERVICE_HOME} && \
sed -i -e "s/bin\/ash/bin\/bash/" /etc/passwd
USER ${SERVICE_USER}
WORKDIR ${SERVICE_HOME}

ENTRYPOINT [ "/usr/bin/dumb-init", "bash" ]