-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added dockerimage with all files and build pipeline
- Loading branch information
1 parent
07b6eb3
commit 0a51b75
Showing
2 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: build and push image | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
|
||
jobs: | ||
|
||
build: | ||
|
||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
|
||
- uses: actions/checkout@v2 | ||
|
||
- name: Set image tag | ||
run: | | ||
LATEST_GIT_TAG=$(git describe --tags --abbrev=0) | ||
echo "TAG=ghcr.io/internetee/epp_proxy:$LATEST_GIT_TAG" >> $GITHUB_ENV | ||
- name: Build image | ||
env: | ||
KEY_BASE: ${{ secrets.KEY_BASE}} | ||
run: | | ||
docker build -t $TAG -f Dockerfile.generic . | ||
- name: Push image to gh container registry | ||
env: | ||
PASSWORD: ${{ secrets.GHCR }} | ||
run: | | ||
echo $PASSWORD | docker login ghcr.io -u eisbot --password-stdin | ||
docker push $TAG | ||
- name: Notify developers | ||
timeout-minutes: 1 | ||
env: | ||
NOTIFICATION_URL: ${{ secrets.NOTIFICATION_URL}} | ||
run: | | ||
curl -i -X POST --data-urlencode 'payload={ | ||
"text": "##### Build of epp proxy image has been succesful :tada:\n | ||
Run: docker pull '$TAG' | ||
" | ||
}' $NOTIFICATION_URL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
FROM debian:buster-slim | ||
LABEL org.opencontainers.image.source=https://github.com/internetee/epp_proxy | ||
|
||
SHELL ["/bin/bash", "-o", "pipefail", "-c"] | ||
COPY ./docker/apt/sources.list /etc/apt/ | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
wget \ | ||
git \ | ||
build-essential=* \ | ||
libncurses5-dev=* \ | ||
automake=* \ | ||
autoconf=* \ | ||
curl=* \ | ||
ca-certificates=* \ | ||
libssl-dev=* \ | ||
libreadline-dev=* \ | ||
libdpkg-perl=* \ | ||
liberror-perl=* \ | ||
libc6=* \ | ||
libc-dev \ | ||
perl=* \ | ||
procps=* \ | ||
inotify-tools=* \ | ||
libssl1.1=* \ | ||
perl-base=* \ | ||
zlib1g-dev \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN git clone https://github.com/asdf-vm/asdf.git "$HOME"/.asdf && \ | ||
echo '. $HOME/.asdf/asdf.sh' >> "$HOME"/.bashrc && \ | ||
echo '. $HOME/.asdf/asdf.sh' >> "$HOME"/.profile | ||
|
||
ENV PATH="${PATH}:/root/.asdf/shims:/root/.asdf/bin" | ||
|
||
RUN mkdir -p /opt/erlang/epp_proxy | ||
WORKDIR /opt/erlang/epp_proxy | ||
|
||
COPY . . | ||
RUN asdf plugin-add erlang | ||
RUN asdf install | ||
RUN asdf global erlang $(grep erlang .tool-versions | cut -d' ' -f2) | ||
RUN asdf plugin-add ruby | ||
RUN asdf plugin-add rebar | ||
RUN asdf install |