Skip to content

Commit

Permalink
Switch to debian buster for docker image builds; add extra arches
Browse files Browse the repository at this point in the history
  • Loading branch information
sosedoff committed Jun 28, 2022
1 parent 7b7364c commit bc4a907
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ jobs:
context: .
push: false
tags: pgweb:latest
platforms: linux/amd64,linux/arm64
platforms: darwin/amd64,darwin/arm64,linux/amd64,linux/arm64,linux/arm/v5,linux/arm/v7,linux/386
12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ------------------------------------------------------------------------------
# Builder Stage
# ------------------------------------------------------------------------------
FROM golang:1.18 AS build
FROM golang:1.18-buster AS build

WORKDIR /build
ADD . /build
Expand All @@ -12,13 +12,15 @@ RUN make build
# ------------------------------------------------------------------------------
# Release Stage
# ------------------------------------------------------------------------------
FROM alpine:3.16
FROM debian:buster-slim

RUN \
apk update && \
apk add --no-cache ca-certificates openssl postgresql && \
apt-get update && \
apt-get install -y ca-certificates openssl postgresql && \
update-ca-certificates && \
rm -rf /var/cache/apk/*
apt-get clean autoclean && \
apt-get autoremove --yes && \
rm -rf /var/lib/{apt,dpkg,cache,log}/

COPY --from=build /build/pgweb /usr/bin/pgweb

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ clean:
@rm -rf ./bin/*

docker:
docker build --platform=linux/amd64 --no-cache -t pgweb .
docker build --no-cache -t pgweb .

docker-release:
docker build --no-cache -t $(DOCKER_RELEASE_TAG) .
Expand Down

0 comments on commit bc4a907

Please sign in to comment.