Merge pull request #658 from owncloud/image_builder_rebased

Add Image builder
This commit is contained in:
Michael Barz
2020-10-08 15:05:06 +02:00
committed by GitHub
2 changed files with 48 additions and 3 deletions

32
Dockerfile Normal file
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

View File

@@ -49,7 +49,6 @@ mkdir -p /var/tmp/reva/root/{home,oc}
## Quickstart
- Make sure that the binary was built with the above steps.
- Now start all services with the following command
```console
@@ -57,9 +56,7 @@ mkdir -p /var/tmp/reva/root/{home,oc}
```
- Open <https://localhost:9200>
- Accept the self-signed certificate (it is regenerated every time the server starts)
- Login using one of the demo accounts:
```console
@@ -68,6 +65,22 @@ marie:radioactivity
richard:superfluidity
```
## Create a local Docker image for testing
Navigate into the root folder of the repository and execute
```console
docker build -t owncloud/ocis:dev .
```
To run it, execute
```console
docker run --rm -ti owncloud/ocis:dev
```
The image can be tagged however you like, just make sure you run the right one then
## Running single extensions
The list of available extensions can be found in the "Extensions" section when running `./bin/ocis`.