未验证 提交 16baf4ec 编写于 作者: A Avi Aryan

use build variant in docker building, fixes #31

上级 8ce6009e
# #
# abc Dockerfile # abc Dockerfile
# docker build -t abc . # docker build --build-arg ABC_BUILD=oss -t abc .
# docker volume create --name abc # docker volume create --name abc
# docker run -i --rm -v abc:/root --name abc abc login google # docker run -i --rm -v abc:/root abc login google
# root is $HOME, -i for stdin, --rm to remove container # root is $HOME, -i for stdin, --rm to remove container
# #
...@@ -22,8 +22,13 @@ ADD . /go/src/github.com/appbaseio/abc ...@@ -22,8 +22,13 @@ ADD . /go/src/github.com/appbaseio/abc
# Define working directory # Define working directory
WORKDIR /go/src/github.com/appbaseio/abc WORKDIR /go/src/github.com/appbaseio/abc
# Get build variant
ARG ABC_BUILD=oss
ENV ABC_BUILD ${ABC_BUILD}
# Run build
RUN cd /go/src/github.com/appbaseio/abc && \ RUN cd /go/src/github.com/appbaseio/abc && \
go build ./cmd/abc/... go build -tags $ABC_BUILD ./cmd/abc/...
# Define default entrypoint # Define default entrypoint
# Entrypoint gets extra parameters from docker run # Entrypoint gets extra parameters from docker run
......
...@@ -59,7 +59,7 @@ Note - You might be wondering what is the tag `oss` doing there. That's covered ...@@ -59,7 +59,7 @@ Note - You might be wondering what is the tag `oss` doing there. That's covered
```sh ```sh
git clone https://github.com/appbaseio-confidential/abc git clone https://github.com/appbaseio-confidential/abc
cd abc cd abc
docker build -t abc . docker build --build-arg ABC_BUILD=oss -t abc .
docker volume create --name abc docker volume create --name abc
``` ```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册