Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
matrix-media-repo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
matrix-media-repo
Commits
cfeb2f96
Commit
cfeb2f96
authored
5 years ago
by
Andrew Morgan
Browse files
Options
Downloads
Patches
Plain Diff
fixed dockerfile
parent
5eb2b0c4
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Dockerfile
+7
-11
7 additions, 11 deletions
Dockerfile
build.sh
+1
-1
1 addition, 1 deletion
build.sh
with
8 additions
and
12 deletions
Dockerfile
+
7
−
11
View file @
cfeb2f96
# ---- Stage 0 ----
# Builds media_repo and import_synapse
FROM
golang:1.1
1
-alpine
AS
builder
FROM
golang:1.1
2
-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/
...
...
This diff is collapsed.
Click to expand it.
build.sh
+
1
−
1
View file @
cfeb2f96
#!/bin/
ba
sh
#!/bin/sh
GOBIN
=
$PWD
/
`
dirname
$0
`
/bin go
install
-v
./cmd/...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment