-
Notifications
You must be signed in to change notification settings - Fork 16
[WIP] init(dockerfile): add additional file #3
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
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| # Developer: | ||
| # --------- | ||
| # Name: Maik Ellerbrock | ||
| # | ||
| # GitHub: https://github.com/ellerbrock | ||
| # Twitter: https://twitter.com/frapsoft | ||
| # Docker: https://hub.docker.com/u/ellerbrock | ||
| # Quay: https://quay.io/user/ellerbrock | ||
| # | ||
| # Description: | ||
| # ----------- | ||
| # Bash Shell v.5 bats and deps for development | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 bash:5 | ||
|
|
||
| MAINTAINER Maik Ellerbrock | ||
|
||
|
|
||
| ENV VERSION 0.1.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} | ||
|
|
||
| # Configure Go | ||
| ENV GOROOT /usr/lib/go | ||
| ENV GOPATH ${SERVICE_HOME}/go | ||
|
|
||
| RUN \ | ||
| adduser -h ${SERVICE_HOME} -s /bin/bash -u 1000 -D ${SERVICE_USER} && \ | ||
| apk add --no-cache \ | ||
| dumb-init \ | ||
| git \ | ||
| go \ | ||
| py3-pip \ | ||
| python3 \ | ||
| python3-dev \ | ||
| shellcheck \ | ||
| tzdata && \ | ||
| cp /usr/share/zoneinfo/${SYSTEM_TZ} /etc/localtime && \ | ||
| echo "${SYSTEM_TZ}" > /etc/TZ && \ | ||
| pip3 install pre-commit && \ | ||
| GO111MODULE=on go get mvdan.cc/sh/v3/cmd/shfmt && \ | ||
| ln -s ${GOPATH}/bin/shfmt /usr/local/bin \ | ||
| git clone --depth 1 https://github.com/sstephenson/bats.git /tmp/bats && \ | ||
| /tmp/bats/install.sh /usr/local && \ | ||
| chown -R ${SERVICE_USER}:${SERVICE_USER} ${SERVICE_HOME} && \ | ||
| sed -i -e "s/bin\/ash/bin\/bash/" /etc/passwd && \ | ||
| apk del git tzdata && \ | ||
| rm -rf /tmp/{.}* /tmp/* | ||
|
|
||
| USER ${SERVICE_USER} | ||
|
|
||
| WORKDIR ${SERVICE_HOME} | ||
|
|
||
| ENTRYPOINT [ "/usr/bin/dumb-init", "bash" ] | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldnt write this under Maik's name. as he did not write it, you can write it your name here, it does not bear any responsibility 😄