-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.local
More file actions
21 lines (15 loc) · 1.24 KB
/
Dockerfile.local
File metadata and controls
21 lines (15 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FROM golang:1.14
# NOTE: Build context is expected to be one level higher than your app's code folder. Please call docker build from there
# Copy app source
ADD ./passman_server /go/src/github.com/spacetimi/passman_server
# Copy shared source, and add go.mod replace directive to use this instead of from the module repo
ADD ./timi_shared_server /go/src/github.com/spacetimi/timi_shared_server
RUN echo 'replace github.com/spacetimi/timi_shared_server => /go/src/github.com/spacetimi/timi_shared_server' >> /go/src/github.com/spacetimi/passman_server/go.mod
# Override any localhost URLs to host.docker.internal so we can use services running on host machine
RUN sed -i -e 's/localhost/host.docker.internal/g' /go/src/github.com/spacetimi/passman_server/config/environment_config.local.json
RUN sed -i -e 's/localhost/host.docker.internal/g' /go/src/github.com/spacetimi/passman_server/config/services/mongo_adaptor/local.json
RUN sed -i -e 's/localhost/host.docker.internal/g' /go/src/github.com/spacetimi/passman_server/config/services/redis_adaptor/local.json
# Build and install the server binary
RUN cd /go/src/github.com/spacetimi/passman_server && go install /go/src/github.com/spacetimi/passman_server/main/main.go
ENTRYPOINT /go/bin/main
EXPOSE 9000