-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile.dev
47 lines (30 loc) · 1.33 KB
/
Dockerfile.dev
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
ARG WP_VERSION=6.5.3
FROM ghcr.io/n0rthernl1ghts/wordpress:${WP_VERSION} AS composer-build
COPY --from=composer:2.7 ["/usr/bin/composer", "/usr/local/bin/composer"]
RUN set -eux \
&& apk add --update --no-cache git unzip \
&& export COMPOSER_ALLOW_SUPERUSER=1 \
&& export COMPOSER_HOME="/tmp/composer" \
&& composer global require --no-interaction --ignore-platform-reqs \
php-parallel-lint/php-console-highlighter \
php-parallel-lint/php-parallel-lint \
squizlabs/php_codesniffer
FROM scratch AS rootfs
# Install shellcheck
COPY --from=koalaman/shellcheck:stable ["/bin/shellcheck", "/usr/local/bin/shellcheck"]
# Install shfmt
COPY --from=mvdan/shfmt:latest ["/bin/shfmt", "/usr/local/bin/shfmt"]
# Install hadolint
COPY --from=hadolint/hadolint:latest ["/bin/hadolint", "/usr/local/bin/hadolint"]
# Install composer
COPY --from=composer-build ["/usr/local/bin/composer", "/usr/local/bin/"]
COPY --from=composer-build ["/tmp/composer/", "/root/.composer/"]
ARG WP_VERSION
FROM ghcr.io/n0rthernl1ghts/wordpress:${WP_VERSION}
ENV PATH="${PATH}:/root/.composer/vendor/bin"
RUN set -eux \
&& apk add --update --no-cache curl exa file fish git less nano openssh-client rsync tree unzip wget
COPY --from=rootfs ["/", "/"]
ENV COMPOSER_ALLOW_SUPERUSER=1
WORKDIR "/workspace"
ENTRYPOINT ["/usr/bin/fish"]