提交 3c7f9bd0 编写于 作者: S Siddharth Kothari

creates private dockerfile for easy build with Dockerhub

上级 aca81627
#
# abc Dockerfile
# private: docker build --build-arg ABC_BUILD=noss -t abc .
# docker volume create --name abc
# docker run -i --rm -v abc:/root abc login google
# root is $HOME, -i for stdin, --rm to remove container
#
# Pull the base image
FROM alpine:3.8
MAINTAINER Siddharth Kothari <siddharth@appbase.io>
# Set GOPATH
ENV GOPATH /go
# certs
RUN apk --update add --no-cache ca-certificates
RUN update-ca-certificates
# Make directories for the code
RUN mkdir -p /go/src/github.com/appbaseio/abc
RUN mkdir -p /abc
# Add abc files
ADD . /go/src/github.com/appbaseio/abc
# install the noss variant
RUN apk add --no-cache --virtual build-dependencies go libc-dev && \
cd /go/src/github.com/appbaseio/abc && \
go build -tags noss ./cmd/abc/... && \
mv ./abc /abc/ && \
apk del build-dependencies && \
rm -rf /go && \
rm -rf /usr/local/go
WORKDIR /abc
# Define default entrypoint
# Entrypoint gets extra parameters from docker run
ENTRYPOINT ["./abc"]
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册