Skip to content

Commit

Permalink
Merge pull request #138 from jacobweinstock/fix-dockerfiles
Browse files Browse the repository at this point in the history
Fix Docker build warning:

## Description

<!--- Please describe what this PR is going to change -->
Docker build is warning about:
"`FromAsCasing: 'as' and 'FROM' keywords' casing do not match`" This resolves the warning.

## Why is this needed

<!--- Link to issue you have raised -->

Fixes: #

## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->


## How are existing users impacted? What migration steps/scripts do we need?

<!--- Fixes a bug, unblocks installation, removes a component of the stack etc -->
<!--- Requires a DB migration script, etc. -->


## Checklist:

I have:

- [ ] updated the documentation and/or roadmap (if required)
- [ ] added unit or e2e tests
- [ ] provided instructions on how to upgrade
  • Loading branch information
jacobweinstock authored Aug 20, 2024
2 parents c2452a9 + 0c44701 commit 89f0f5d
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion archive2disk/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1

FROM golang:1.21-alpine as archive2disk
FROM golang:1.21-alpine AS archive2disk
RUN apk add --no-cache git ca-certificates gcc musl-dev
COPY . /src
WORKDIR /src/archive2disk
Expand Down
2 changes: 1 addition & 1 deletion cexec/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1

FROM golang:1.21-alpine as cexec
FROM golang:1.21-alpine AS cexec
RUN apk add --no-cache git ca-certificates gcc linux-headers musl-dev
COPY . /src
WORKDIR /src/cexec
Expand Down
2 changes: 1 addition & 1 deletion image2disk/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1

FROM golang:1.21-alpine as image2disk
FROM golang:1.21-alpine AS image2disk
RUN apk add --no-cache git ca-certificates gcc linux-headers musl-dev
COPY . /src
WORKDIR /src/image2disk
Expand Down
2 changes: 1 addition & 1 deletion kexec/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1

FROM golang:1.21-alpine as kexec
FROM golang:1.21-alpine AS kexec
RUN apk add --no-cache git ca-certificates gcc linux-headers musl-dev
COPY . /src
WORKDIR /src/kexec
Expand Down
2 changes: 1 addition & 1 deletion oci2disk/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1

FROM golang:1.21-alpine as oci2disk
FROM golang:1.21-alpine AS oci2disk
RUN apk add --no-cache git ca-certificates gcc linux-headers musl-dev
COPY . /src
WORKDIR /src/oci2disk
Expand Down
6 changes: 3 additions & 3 deletions qemuimg2disk/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1

FROM alpine:3.13 as builder
FROM alpine:3.13 AS builder
ENV QEMU_NAME="qemu"
ARG QEMU_REV="6.1.0"
ENV QEMU_SRC_BASENAME="${QEMU_NAME}-${QEMU_REV}"
Expand Down Expand Up @@ -40,14 +40,14 @@ RUN sed -e 's|-lbrotlidec|-lbrotlicommon-static -lbrotlidec-static -lbrotlienc-s
RUN make -j$(nproc) qemu-img
RUN cp build/qemu-img /bin/qemu-img

FROM golang:1.21-alpine as qemuimg2disk
FROM golang:1.21-alpine AS qemuimg2disk
COPY . /src
WORKDIR /src/qemuimg2disk
RUN go mod tidy
RUN go build -o qemuimg2disk .

# Collect all the files we need into a scratch image.
FROM scratch as collect
FROM scratch AS collect
COPY --from=builder /bin/qemu-img /bin/qemu-img
COPY --from=builder /bin/sh /bin/sh
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
Expand Down
10 changes: 5 additions & 5 deletions rootio/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# syntax=docker/dockerfile:1

# Build mkfs as an static
FROM gcc:10.5.0 as mke2fs
FROM gcc:10.5.0 AS mke2fs
RUN wget https://mirrors.edge.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v1.45.6/e2fsprogs-1.45.6.tar.gz; tar -xvzf ./e2fsprogs-1.45.6.tar.gz
WORKDIR /e2fsprogs-1.45.6/
RUN ./configure --enable-static=yes CFLAGS='-g -O2 -static'
RUN make
RUN make -C misc mke2fs.static

# build swap as static
FROM gcc:10.5.0 as swap
FROM gcc:10.5.0 AS swap
RUN git clone git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git
WORKDIR /util-linux/
RUN apt-get update; apt-get install -y gettext bison autopoint flex
Expand All @@ -19,7 +19,7 @@ RUN make LDFLAGS="-all-static" swapon
RUN make LDFLAGS="-all-static" mkswap

# Build rootio
FROM golang:1.21-alpine as rootio
FROM golang:1.21-alpine AS rootio
RUN apk add --no-cache git ca-certificates gcc linux-headers musl-dev
COPY . /src
WORKDIR /src/rootio
Expand All @@ -28,15 +28,15 @@ RUN --mount=type=cache,sharing=locked,id=gomod,target=/go/pkg/mod/cache \
CGO_ENABLED=1 GOOS=linux go build -a -ldflags "-linkmode external -extldflags '-static' -s -w" -o rootio

# build fattools as static
FROM gcc:10.5.0 as fattools
FROM gcc:10.5.0 AS fattools
RUN git clone https://github.com/dosfstools/dosfstools
WORKDIR /dosfstools/
RUN ./autogen.sh
RUN ./configure
RUN make LDFLAGS="--static"

# build lvm2 as static
FROM alpine:3.18 as lvm
FROM alpine:3.18 AS lvm
RUN apk update && apk add lvm2-static=2.03.21-r3

# Build final image
Expand Down
2 changes: 1 addition & 1 deletion slurp/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1

FROM golang:1.21-alpine as slurp
FROM golang:1.21-alpine AS slurp
RUN apk add --no-cache git ca-certificates gcc linux-headers musl-dev
COPY . /src
WORKDIR /src/slurp
Expand Down
4 changes: 2 additions & 2 deletions syslinux/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1

# Build syslinux as an syslinux3.86
FROM gcc:10.2.0 as syslinux3.86
FROM gcc:10.2.0 AS syslinux3.86
RUN apt-get update -y; apt-get install -y nasm build-essential uuid-dev
RUN wget https://cdn.kernel.org/pub/linux/utils/boot/syslinux/3.xx/syslinux-3.86.tar.gz; tar -xvzf ./syslinux-3.86.tar.gz
WORKDIR /syslinux-3.86/libinstaller
Expand All @@ -14,7 +14,7 @@ RUN gcc -Wp,-MT,ldlinux_bin.o,-MMD,./.ldlinux_bin.o.d -W -Wall -Wstrict-prototyp
RUN gcc -s -static -o syslinux syslinux.o syslxmod.o bootsect_bin.o ldlinux_bin.o

# Build syslinux
FROM golang:1.21-alpine as syslinux
FROM golang:1.21-alpine AS syslinux
RUN apk add --no-cache git ca-certificates gcc linux-headers musl-dev
COPY . /src
WORKDIR /src/syslinux
Expand Down
2 changes: 1 addition & 1 deletion writefile/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1

FROM golang:1.21-alpine as writefile
FROM golang:1.21-alpine AS writefile
RUN apk add --no-cache git ca-certificates gcc musl-dev
COPY . /src
WORKDIR /src/writefile
Expand Down

0 comments on commit 89f0f5d

Please sign in to comment.