Initial commit
This commit is contained in:
34
misc/docker/Dockerfile
Normal file
34
misc/docker/Dockerfile
Normal file
@ -0,0 +1,34 @@
|
||||
FROM golang:1.15 AS build
|
||||
|
||||
ARG HTTP_PROXY=
|
||||
ARG HTTPS_PROXY=
|
||||
ARG http_proxy=
|
||||
ARG https_proxy=
|
||||
|
||||
RUN apt-get update && apt-get install -y build-essential git bash curl
|
||||
|
||||
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - \
|
||||
&& apt-get install -y nodejs
|
||||
|
||||
COPY . /src
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
RUN cp -f misc/docker/config-patch.yml misc/release/config-patch.yml
|
||||
|
||||
RUN go get github.com/krishicks/yaml-patch/cmd/yaml-patch
|
||||
|
||||
RUN npm install \
|
||||
&& make vendor \
|
||||
&& echo "---" > ./misc/release/config-patch.yml \
|
||||
&& make ARCH_TARGETS=amd64 release
|
||||
|
||||
FROM busybox
|
||||
|
||||
COPY --from=build /src/release/fake-sms-linux-amd64 /app
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN mkdir -p /app
|
||||
|
||||
CMD ["bin/fake-sms", "--config", "config.yml"]
|
1
misc/docker/config-patch.yml
Normal file
1
misc/docker/config-patch.yml
Normal file
@ -0,0 +1 @@
|
||||
---
|
Reference in New Issue
Block a user