Comments (3)
Here's what I did for my other project. Am pretty happy with it
FROM golang:alpine
WORKDIR /go/src/app
COPY . .
ENV USER=go \
UID=1000 \
GID=1000 \
GOOS=linux \
GOARCH=amd64 \
CGO_ENABLED=0
RUN go build -ldflags="-s -w" -o webhook && \
addgroup --gid "$GID" "$USER" && \
adduser \
--disabled-password \
--gecos "" \
--home "$(pwd)" \
--ingroup "$USER" \
--no-create-home \
--uid "$UID" \
"$USER" && \
chown "$UID":"$GID" /go/src/app/webhook
FROM scratch
ENV GIN_MODE=release \
METRICS=true
COPY --from=0 /etc/passwd /etc/passwd
COPY --from=0 /go/src/app/webhook /
USER 1000
ENTRYPOINT ["/webhook"]
from go-aws-news.
I've added environment variables DOCKER_USERNAME
and DOCKER_PASSWORD
in travis for publishing docker images via ci.
Here's what I did for my other go project to publish docker images via travis.
from go-aws-news.
done with #17
from go-aws-news.
Related Issues (12)
- Example in README.md will not compile HOT 1
- implement Discord provider
- implement Yammer provider
- implement Rocket.chat provider
- Create documentation for using docker image HOT 1
- create k8s cronjob and configmap example HOT 1
- Add go doc examples for module
- implement smtp provider
- improve Discord provider content layout
- No longer detecting AWS announcements 😞 HOT 7
- Past May - No Results
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-aws-news.