2021-10-15 16:09:23 +02:00
|
|
|
FROM golang:1.17 AS build
|
2020-12-21 15:56:56 +01:00
|
|
|
|
|
|
|
ARG HTTP_PROXY=
|
|
|
|
ARG HTTPS_PROXY=
|
|
|
|
ARG http_proxy=
|
|
|
|
ARG https_proxy=
|
|
|
|
|
2021-10-15 16:09:23 +02:00
|
|
|
RUN apt-get update && apt-get install -y build-essential git bash curl python2
|
2020-12-21 15:56:56 +01:00
|
|
|
|
2024-02-26 13:13:02 +01:00
|
|
|
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash - \
|
2020-12-21 15:56:56 +01:00
|
|
|
&& 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
|
|
|
|
|
2024-02-27 14:36:04 +01:00
|
|
|
RUN npm ci \
|
2020-12-21 15:56:56 +01:00
|
|
|
&& 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"]
|