Fix Docker files
This commit is contained in:
parent
74827428bd
commit
2d52771fcc
|
@ -1,10 +1,9 @@
|
||||||
FROM golang:alpine3.6
|
FROM docker.io/golang:1.12.5-alpine3.9
|
||||||
|
|
||||||
RUN mkdir /build
|
RUN mkdir /build
|
||||||
|
|
||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
|
|
||||||
RUN apk --update --no-cache add openssl bash git && \
|
RUN apk --update --no-cache add openssl bash git
|
||||||
go get github.com/constabulary/gb/...
|
|
||||||
|
|
||||||
CMD ["bash", "docker/build.sh"]
|
CMD ["bash", "docker/build.sh"]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
gb build
|
./build.sh
|
||||||
|
|
||||||
# Generate the keys if they don't already exist.
|
# Generate the keys if they don't already exist.
|
||||||
if [ ! -f server.key ] || [ ! -f server.crt ] || [ ! -f matrix_key.pem ]; then
|
if [ ! -f server.key ] || [ ! -f server.crt ] || [ ! -f matrix_key.pem ]; then
|
||||||
|
@ -12,7 +12,7 @@ if [ ! -f server.key ] || [ ! -f server.crt ] || [ ! -f matrix_key.pem ]; then
|
||||||
-keyout server.key \
|
-keyout server.key \
|
||||||
-out server.crt \
|
-out server.crt \
|
||||||
-days 3650 -nodes \
|
-days 3650 -nodes \
|
||||||
-subj /CN=localhost
|
-subj /CN=localhost
|
||||||
|
|
||||||
test -f matrix_key.pem || /build/bin/generate-keys -private-key matrix_key.pem
|
test -f matrix_key.pem || /build/bin/generate-keys -private-key matrix_key.pem
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -7,7 +7,6 @@ services:
|
||||||
build: ./
|
build: ./
|
||||||
volumes:
|
volumes:
|
||||||
- ..:/build
|
- ..:/build
|
||||||
- ./build/pkg:/build/pkg
|
|
||||||
- ./build/bin:/build/bin
|
- ./build/bin:/build/bin
|
||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
|
|
Loading…
Reference in a new issue