Thanks to visit codestin.com
Credit goes to github.com

Skip to content
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
22 changes: 22 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
dist/
dist/*
dist/**
*.db
vendor
vendor/
vendor/*
vendor/**
.git
.git/**
.github/
.github/**
.gitignore
.dockerignore
*.yml
*.md
Dockerfile
Gopkg.*
data
data/**
docs
docs/**
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

.DS_Store
# Created by https://www.gitignore.io/api/go

### Go ###
Expand Down Expand Up @@ -30,3 +30,7 @@ limo

# Test coverage
*.out
node_mosules
/node_modules/
vendor

12 changes: 6 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
## 0.1.0 - 2016-06-27
### Initial Release

[Unreleased]: https://github.com/hoop33/limo/compare/v0.5.0...HEAD
[0.5.0]: https://github.com/hoop33/limo/compare/v0.4.0...v0.5.0
[0.4.0]: https://github.com/hoop33/limo/compare/v0.3.1...v0.4.0
[0.3.1]: https://github.com/hoop33/limo/compare/v0.3.0...v0.3.1
[0.3.0]: https://github.com/hoop33/limo/compare/v0.2.0...v0.3.0
[0.2.0]: https://github.com/hoop33/limo/compare/v0.1.0...v0.2.0
[Unreleased]: https://github.com/lucmski/limo/compare/v0.5.0...HEAD
[0.5.0]: https://github.com/lucmski/limo/compare/v0.4.0...v0.5.0
[0.4.0]: https://github.com/lucmski/limo/compare/v0.3.1...v0.4.0
[0.3.1]: https://github.com/lucmski/limo/compare/v0.3.0...v0.3.1
[0.3.0]: https://github.com/lucmski/limo/compare/v0.2.0...v0.3.0
[0.2.0]: https://github.com/lucmski/limo/compare/v0.1.0...v0.2.0
58 changes: 58 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
############################
# Builder image
############################
ARG GOLANG_BUILDER_VERSION=1.13rc1-alpine
FROM golang:${GOLANG_BUILDER_VERSION} AS builder

# Here's a oneliner for your Dockerfile that fails if the Alpine image is vulnerable.
# RUN apk add --no-network --no-cache --repositories-file /dev/null "apk-tools>2.10.1"

# install pre-requisites
RUN apk update && \
apk add --no-cache --no-progress build-base git tzdata ca-certificates sqlite-dev && \
update-ca-certificates && \
go get github.com/Masterminds/glide

# copy sources
COPY . /go/src/github.com/lucmski/limo
WORKDIR /go/src/github.com/lucmski/limo

# fetch dependencies
# RUN yes no | glide create && glide install --strip-vendor && go build -o /opf .
# RUN go get -d -v ./...
RUN glide install --strip-vendor && \
GOOS=linux GOARCH=amd64 CGO_ENABLED=1 go build -o /limo .

############################
# Runtime image
############################
FROM alpine:3.10 AS runtime

# Install tini to /usr/local/sbin
ADD https://github.com/krallin/tini/releases/download/v0.18.0/tini-muslc-amd64 /usr/local/sbin/tini

# Install runtime dependencies & create runtime user
RUN \
apk update && \
apk add --no-cache --no-progress ca-certificates && \
rm -rf /var/cache/apk/* && \
\
chmod +x /usr/local/sbin/tini && \
mkdir -p /opt && \
\
adduser -D limo -h /opt/limo -s /bin/sh && \
su limo -c 'cd /opt/limo; mkdir -p bin config data services'

# Switch to user context
USER limo
WORKDIR /opt/limo

COPY --from=builder /limo /opt/limo/bin/limo
ENV PATH $PATH:/opt/limo/bin

# Container configuration
EXPOSE 8888
VOLUME ["/opt/limo/data"]
# ENTRYPOINT ["tini", "-g", "--"]
ENTRYPOINT [ "/opt/limo/bin/limo" ]
# CMD [ "/opt/operative-framework/bin/opf" ]
Loading