2024-02-26 14:56:58 +01:00
|
|
|
FROM reg.cadoles.com/dh/library/golang:1.22-alpine AS build
|
2020-12-21 15:56:56 +01:00
|
|
|
|
|
|
|
ARG HTTP_PROXY=
|
|
|
|
ARG HTTPS_PROXY=
|
|
|
|
ARG http_proxy=
|
|
|
|
ARG https_proxy=
|
|
|
|
|
2024-02-26 14:56:58 +01:00
|
|
|
RUN apk update && apk add --no-cache build-base git bash curl python3 nodejs npm
|
2020-12-21 15:56:56 +01:00
|
|
|
|
|
|
|
COPY . /src
|
|
|
|
|
|
|
|
WORKDIR /src
|
|
|
|
|
|
|
|
RUN cp -f misc/docker/config-patch.yml misc/release/config-patch.yml
|
|
|
|
|
2024-02-26 14:56:58 +01:00
|
|
|
RUN go install github.com/krishicks/yaml-patch/cmd/yaml-patch@v0.0.10
|
2020-12-21 15:56:56 +01:00
|
|
|
|
|
|
|
RUN npm install \
|
|
|
|
&& make vendor \
|
|
|
|
&& echo "---" > ./misc/release/config-patch.yml \
|
|
|
|
&& make ARCH_TARGETS=amd64 release
|
|
|
|
|
2024-02-26 11:54:51 +01:00
|
|
|
|
2020-12-21 15:56:56 +01:00
|
|
|
FROM busybox
|
|
|
|
|
2024-02-26 11:54:51 +01:00
|
|
|
RUN adduser -D -h /app sms
|
|
|
|
|
2020-12-21 15:56:56 +01:00
|
|
|
COPY --from=build /src/release/fake-sms-linux-amd64 /app
|
2024-02-26 11:54:51 +01:00
|
|
|
RUN chown -R sms:sms /app
|
2020-12-21 15:56:56 +01:00
|
|
|
|
2024-02-26 11:54:51 +01:00
|
|
|
USER sms
|
2020-12-21 15:56:56 +01:00
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
CMD ["bin/fake-sms", "--config", "config.yml"]
|