diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..ad0a5f0 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,8 @@ +** +!go.* +!*.go +!assets +!cmd +!cointop +!pkg +!vendor diff --git a/Dockerfile b/Dockerfile index c066462..cdff1eb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,14 +4,15 @@ RUN mkdir /app WORKDIR /app ARG VERSION -ADD . /app/ +COPY . ./ RUN go build -ldflags=-s -ldflags=-w -ldflags=-X=github.com/miguelmota/cointop/cointop.version=$VERSION -o main . -RUN git clone https://github.com/cointop-sh/colors && rm -Rf colors/.git* +ADD https://github.com/cointop-sh/colors/archive/master.tar.gz ./ +RUN tar zxf master.tar.gz --exclude images FROM busybox:glibc RUN mkdir -p /etc/ssl COPY --from=build /etc/ssl/certs/ /etc/ssl/certs COPY --from=build /app/main /bin/cointop -COPY --from=build /app/colors /root/.config/cointop/colors -ENTRYPOINT cointop +COPY --from=build /app/colors-master /root/.config/cointop/colors +ENTRYPOINT ["/bin/cointop"] CMD []