Skip to content

Commit

Permalink
use the same docker file for all architectures
Browse files Browse the repository at this point in the history
  • Loading branch information
xu-cheng committed Oct 17, 2019
1 parent 4590aed commit 6f782a5
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 62 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*/
!/Dockerfile
32 changes: 32 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
ARG img=debian/eol:wheezy
FROM ${img}

RUN uname -a

ENV PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$PATH \
HOMEBREW_BUILD_BOTTLE=1 \
HOMEBREW_DEVELOPER=1 \
HOMEBREW_NO_ANALYTICS=1 \
HOMEBREW_NO_AUTO_UPDATE=1

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
bzip2 \
ca-certificates \
curl \
file \
g++ \
git-core \
locales \
make \
patch \
&& rm -rf /var/lib/apt/lists/*

RUN localedef -i en_US -f UTF-8 en_US.UTF-8 \
&& useradd -m -s /bin/bash linuxbrew

RUN git clone --depth=1 https://github.com/Homebrew/brew /home/linuxbrew/.linuxbrew/Homebrew \
&& git clone --depth=1 https://github.com/Homebrew/linuxbrew-core /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core \
&& mkdir /home/linuxbrew/.linuxbrew/bin \
&& ln -s ../Homebrew/bin/brew /home/linuxbrew/.linuxbrew/bin/ \
&& brew tap homebrew/portable-ruby
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ Run `brew portable-package ruby` inside an OS X 10.9 VM (so it is compatible wit

Build a Docker image for your architecture by running one of the following commands.

- `docker build -f docker/Dockerfile.x86_64 -t homebrew-portable .`
- `docker build -f docker/Dockerfile.arm -t homebrew-portable .`
- `docker build -f docker/Dockerfile.arm64 -t homebrew-portable .`
- `docker build -f Dockerfile --platform linux/amd64 --build-arg img=debian/eol:wheezy -t homebrew-portable .`
- `docker build -f Dockerfile --platform linux/arm/v7 --build-arg img=debian/eol:wheezy -t homebrew-portable .`
- `docker build -f Dockerfile --platform linux/arm64/v8 --build-arg img=debian/eol:jessie -t homebrew-portable .`

Build the `portable-ruby` package using that Docker image.

Expand Down
19 changes: 0 additions & 19 deletions docker/Dockerfile.arm

This file was deleted.

21 changes: 0 additions & 21 deletions docker/Dockerfile.arm64

This file was deleted.

19 changes: 0 additions & 19 deletions docker/Dockerfile.x86_64

This file was deleted.

0 comments on commit 6f782a5

Please sign in to comment.