Adds Dockerfile for building a local development image

Add image builder documentation

Fix list item indent

Fix codacy issues

Make alpine version explicit

Fix markup indents

Fix image tag

Remove list items from markdown
This commit is contained in:
Jan Müller
2020-10-08 11:41:20 +02:00
committed by Michael Barz
parent 621b411c7f
commit 4fafb96bbb
2 changed files with 48 additions and 3 deletions
+32
View File
@@ -0,0 +1,32 @@
FROM golang:alpine as build
COPY ./ /ocis/
ENV CGO_ENABLED=0
ENV GOOS=linux
RUN apk update && \
apk upgrade && \
apk add make gcc bash && \
rm -rf /var/cache/apk/*
WORKDIR /ocis/ocis
RUN make clean generate build
FROM amd64/alpine:3
RUN apk update && \
apk upgrade && \
apk add ca-certificates mailcap && \
rm -rf /var/cache/apk/* && \
echo 'hosts: files dns' >| /etc/nsswitch.conf
LABEL maintainer="ownCloud GmbH <devops@owncloud.com>" \
org.label-schema.name="ownCloud Infinite Scale" \
org.label-schema.vendor="ownCloud GmbH" \
org.label-schema.schema-version="1.0"
ENTRYPOINT ["/usr/bin/ocis"]
CMD ["server"]
COPY --from=build /ocis/ocis/bin/ocis /usr/bin/ocis