Skip to content
Snippets Groups Projects
Commit cfeb2f96 authored by Andrew Morgan's avatar Andrew Morgan
Browse files

fixed dockerfile

parent 5eb2b0c4
No related branches found
No related tags found
No related merge requests found
# ---- Stage 0 ----
# Builds media_repo and import_synapse
FROM golang:1.11-alpine AS builder
FROM golang:1.12-alpine AS builder
# Install build dependencies
RUN apk add --no-cache git musl-dev \
&& go get github.com/constabulary/gb/...
RUN apk add --no-cache git musl-dev
WORKDIR /opt
COPY . /opt
COPY ./vendor /opt/vendor
COPY ./src /opt/src
RUN GOPATH=`pwd`/vendor gb vendor restore
WORKDIR /opt
RUN GOPATH=`pwd`:`pwd`/vendor go build -v -o /opt/bin/media_repo ./src/github.com/turt2live/matrix-media-repo/cmd/media_repo/ \
&& GOPATH=`pwd`:`pwd`/vendor go build -v -o /opt/bin/import_synapse ./src/github.com/turt2live/matrix-media-repo/cmd/import_synapse/
RUN ./build.sh
# ---- Stage 1 ----
# Final runtime stage.
FROM alpine
COPY --from=builder /opt/bin/media_repo /opt/bin/import_synapse /usr/local/bin/
RUN apk add --no-cache \
su-exec \
ca-certificates
COPY --from=builder /opt/bin/media_repo /opt/bin/import_synapse /usr/local/bin/
COPY ./config.sample.yaml /etc/media-repo.yaml.sample
COPY ./migrations /var/lib/media-repo-migrations
COPY ./docker/run.sh /usr/local/bin/
......
#!/bin/bash
#!/bin/sh
GOBIN=$PWD/`dirname $0`/bin go install -v ./cmd/...
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment