Skip to content

Commit

Permalink
Merge pull request #680 from ober/add-docs-for-docker
Browse files Browse the repository at this point in the history
Add initial Readme
  • Loading branch information
vyzo committed Jul 22, 2022
2 parents e34c2dc + d7901c5 commit 7cdc02a
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 4 deletions.
9 changes: 5 additions & 4 deletions docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -139,21 +139,21 @@ ubuntu-current-jedi:
docker tag ubuntu-current-jedi gerbil/jedi:ubuntu

package-ubuntu:
docker run -v $(PWD):/src -t gerbil/ubuntu \
docker run -v $(PWD):/src:z -t gerbil/ubuntu \
bash -c "gem install fpm && \
fpm -s dir -p /src/ -t deb -n gerbil-$(GERBIL_VERSION)-gambit-$(GAMBIT_VERSION).ubuntu \
--description 'Gambit and Gerbil Package' /opt/gerbil /opt/gambit"

package-fedora:
docker run -v $(PWD):/src -t gerbil/fedora \
docker run -v $(PWD):/src:z -t gerbil/fedora \
bash -c "yum install -y rubygems ruby-devel rpm-build && \
gem install fpm && \
fpm -s dir -p /src/ -t rpm \
-n gerbil-$(GERBIL_VERSION)-gambit-$(GAMBIT_VERSION).fedora \
--description 'Gambit and Gerbil Package' /opt/gerbil /opt/gambit"

package-amazonlinux:
docker run -v $(PWD):/src -t gerbil/amazonlinux \
docker run -v $(PWD):/src:z -t gerbil/amazonlinux \
bash -c "amazon-linux-extras install -y ruby2.6 && \
yum install -y ruby-devel rubygems rpm-build && \
gem install fpm && \
Expand All @@ -163,10 +163,11 @@ package-amazonlinux:

packages: package-ubuntu package-fedora

push-all: all
push-all:
docker push gerbil/alpine
docker push gerbil/ubuntu
docker push gerbil/fedora
docker push gerbil/amazonlinux

all: alpine amazonlinux fedora ubuntu

Expand Down
25 changes: 25 additions & 0 deletions docker/Readme.org
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#+title: Instructions for docker and package builds

This directory has a =Makefile= and a =Dockerfile= that support building for multiple
Linux distributions.

Building a docker for a specific distro is as simple as
#+begin_src sh
make <distro>
#+end_src

Where distro is one of:
- Alpine
- AmazonLinux
- Fedora
- Ubuntu

** Example
*** Building the Docker image
#+begin_src sh
$ make ubuntu
#+end_src
*** Building the .deb/.rpm/.apk
#+begin_src sh
make package-ubuntu
#+end_src

0 comments on commit 7cdc02a

Please sign in to comment.