rqlite / rqlite-docker

rqlite docker images
MIT License
25 stars 11 forks source link

Added alpine image for 4.2.0 #4

Closed lordgnu closed 6 years ago

lordgnu commented 6 years ago

Added alpine build for 4.2.0. Final image size is ~33MB. I used some code from package.sh to facilitate the build in the initial container

lordgnu commented 6 years ago

It's worth pointing out that the build will only work if the tag already exists in the repo (for future versions)

otoolep commented 6 years ago

Thank you for your contribution @lordgnu

otoolep commented 6 years ago

@lordgnu -- is this expected?

$ docker build -t rqlite/rqlite:4.2.0-alpine .
Sending build context to Docker daemon 4.608 kB
Step 1/16 : FROM golang:1.9-alpine3.6 as go
Error parsing reference: "golang:1.9-alpine3.6 as go" is not a valid repository/tag: invalid reference format
lordgnu commented 6 years ago

@otoolep -- I don't get that when I run it (although Intellij does complain about the same thing)

$ docker image build -t rqlite/rqlite:4.2.0-alpine --no-cache .
Sending build context to Docker daemon  4.608kB
Step 1/16 : FROM golang:1.9-alpine3.6 as go
 ---> 9e3f14138abd
Step 2/16 : ENV GOPATH /root/go PATH ${PATH}:/usr/local/go/bin:/root/go/bin VERSION_TAG v4.2.0 LANG C.UTF-8
 ---> Running in bd82c45c73ac
 ---> 2ffc770a4875
Removing intermediate container bd82c45c73ac
Step 3/16 : RUN apk add --no-cache git bash gcc alpine-sdk build-base
 ---> Running in 41477fc51150
...

Here's my docker version output:

$ docker version
Client:
 Version:      17.09.0-ce
 API version:  1.32
 Go version:   go1.8.3
 Git commit:   afdb6d4
 Built:        Tue Sep 26 22:42:18 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.09.0-ce
 API version:  1.32 (minimum version 1.12)
 Go version:   go1.8.3
 Git commit:   afdb6d4
 Built:        Tue Sep 26 22:40:56 2017
 OS/Arch:      linux/amd64
 Experimental: false
otoolep commented 6 years ago

I'll try again, but it just bombs out for me on my Ubuntu 16 box.