Skip to content

Commit

Permalink
fix: Use debian-slim in Dockerfile (#260)
Browse files Browse the repository at this point in the history
  • Loading branch information
dwilkie authored Jan 17, 2024
1 parent c5f07c1 commit 37cdc69
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
FROM alpine:latest as build-image
FROM debian:bookworm-slim as build-image

ARG APP_ROOT="/app"
WORKDIR $APP_ROOT

RUN apk update --no-cache && apk upgrade --no-cache && apk add --update --no-cache curl grep wget coreutils unzip jq
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y curl grep wget ca-certificates unzip jq

RUN [[ $(arch) = "aarch64" ]] && arch="arm64" || arch="$(arch)" && \
curl -s https://api.github.com/repos/somleng/sms-gateway/releases/latest \
| jq ".assets.[].browser_download_url" \
| grep "somleng-sms-gateway-alpine-${arch}-v.*.zip" \
RUN curl -s https://api.github.com/repos/somleng/sms-gateway/releases/latest \
| jq ".assets[].browser_download_url" \
| grep "somleng-sms-gateway-linux-$(arch)-v.*.zip" \
| tr -d \" \
| wget -qi - -O somleng-sms-gateway.zip \
| echo "downloading..."

RUN unzip somleng-sms-gateway.zip && \
rm somleng-sms-gateway.zip
rm somleng-sms-gateway.zip && \
chmod +x somleng-sms-gateway

# #############################

FROM alpine:latest
FROM debian:bookworm-slim

ARG APP_ROOT="/app"
WORKDIR $APP_ROOT
Expand Down

0 comments on commit 37cdc69

Please sign in to comment.