26 lines
648 B
Docker
26 lines
648 B
Docker
|
FROM alpine:latest
|
||
|
|
||
|
LABEL version="0.1.0" \
|
||
|
author="Daniel Sommer <daniel.sommer@velvettear.de>" \
|
||
|
license="MIT"
|
||
|
|
||
|
MAINTAINER Daniel Sommer <daniel.sommer@velvettear.de>
|
||
|
|
||
|
COPY [ ".", "/tmp/godyn" ]
|
||
|
|
||
|
RUN apk upgrade --no-cache --progress \
|
||
|
&& apk add --no-cache --progress \
|
||
|
tzdata \
|
||
|
go \
|
||
|
&& ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime \
|
||
|
&& echo "Europe/Berlin" > /etc/timezone \
|
||
|
&& cd /tmp/godyn \
|
||
|
&& go build \
|
||
|
&& mkdir -p /opt/godyn \
|
||
|
&& mv /tmp/godyn/godyn /opt/godyn/godyn \
|
||
|
&& cd /opt/godyn \
|
||
|
&& rm -rf /tmp/godyn \
|
||
|
&& apk del --no-cache go \
|
||
|
&& rm -rf /var/cache/apk
|
||
|
|
||
|
ENTRYPOINT ["/opt/godyn/godyn"]
|