godyn/Dockerfile
2023-10-16 15:52:17 +02:00

26 lines
No EOL
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"]