Fix broken docker builds
This commit is contained in:
parent
0d0b55bd1b
commit
8d0b03b54d
|
@ -4,7 +4,8 @@ on:
|
|||
push:
|
||||
# Sequence of patterns matched against refs/heads
|
||||
branches: [
|
||||
"main"
|
||||
"main",
|
||||
"fix-broken-dockerfile", // just needed for testing, remove before merge
|
||||
]
|
||||
|
||||
env:
|
||||
|
@ -241,6 +242,10 @@ jobs:
|
|||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
with:
|
||||
platforms: all
|
||||
- name: Docker Build (Action)
|
||||
uses: hashicorp/actions-docker-build@v1
|
||||
with:
|
||||
|
|
|
@ -14,7 +14,8 @@ project "consul" {
|
|||
"release/1.8.x",
|
||||
"release/1.9.x",
|
||||
"release/1.10.x",
|
||||
"release/1.11.x"
|
||||
"release/1.11.x",
|
||||
"fix-broken-dockerfile", // just needed for testing, remove before merge
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
24
Dockerfile
24
Dockerfile
|
@ -1,5 +1,5 @@
|
|||
# This Dockerfile creates a production release image for the project using crt release flow.
|
||||
FROM alpine:3.13 as default
|
||||
FROM alpine:3.15.0 as default
|
||||
|
||||
ARG VERSION
|
||||
ARG BIN_NAME
|
||||
|
@ -24,7 +24,23 @@ LABEL org.opencontainers.image.authors="Consul Team <consul@hashicorp.com>" \
|
|||
org.opencontainers.image.title="consul" \
|
||||
org.opencontainers.image.description="Consul is a datacenter runtime that provides service discovery, configuration, and orchestration."
|
||||
|
||||
RUN apk add --no-cache dumb-init
|
||||
# Set up certificates and base tools.
|
||||
# libc6-compat is needed to symlink the shared libraries for ARM builds
|
||||
RUN apk update
|
||||
RUN apk add -v --no-cache \
|
||||
dumb-init \
|
||||
libc6-compat \
|
||||
iptables \
|
||||
tzdata \
|
||||
curl \
|
||||
ca-certificates \
|
||||
gnupg \
|
||||
iputils \
|
||||
libcap \
|
||||
openssl \
|
||||
su-exec \
|
||||
jq
|
||||
|
||||
# Create a consul user and group first so the IDs get set the same way, even as
|
||||
# the rest of this may change over time.
|
||||
RUN addgroup $BIN_NAME && \
|
||||
|
@ -36,6 +52,10 @@ RUN mkdir -p /consul/data && \
|
|||
mkdir -p /consul/config && \
|
||||
chown -R consul:consul /consul
|
||||
|
||||
# Set up nsswitch.conf for Go's "netgo" implementation which is used by Consul,
|
||||
# otherwise DNS supercedes the container's hosts file, which we don't want.
|
||||
RUN test -e /etc/nsswitch.conf || echo 'hosts: files dns' > /etc/nsswitch.conf
|
||||
|
||||
# Expose the consul data directory as a volume since there's mutable state in there.
|
||||
VOLUME /consul/data
|
||||
|
||||
|
|
Loading…
Reference in New Issue