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

Add support different cpu arch in Dockerfile #227

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@ RUN cd /src/goproxy &&\

FROM golang:alpine

ARG ARCH=amd64

# Add tini
ENV TINI_VERSION v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-static-amd64 /usr/bin/tini
ENV TINI_ARCH=$ARCH
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-static-${TINI_ARCH} /usr/bin/tini
RUN chmod +x /usr/bin/tini

RUN apk add --no-cache -U git mercurial subversion
Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,20 @@ git config --global url."https://${GITHUB_PERSONAL_ACCESS_TOKEN}@github.com/".in

This can be done for other git providers as well, following the same pattern

## Build docker image

If you want to build the docker image locally (you don't have to):

```shell
docker build -t goproxy/goproxy:latest .
```

or if you are running on arm64

```shell
docker build --build-arg ARCH=arm64 -t goproxy/goproxy:latest .
```

## Use docker image

```shell
Expand Down