Skip to content

Commit

Permalink
Updating bluebell docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
troelsfr committed Sep 7, 2023
1 parent 4c27c33 commit 45be2cd
Showing 1 changed file with 24 additions and 5 deletions.
29 changes: 24 additions & 5 deletions products/bluebell/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
FROM rustlang/rust:nightly AS builder
FROM ubuntu:22.04 AS builder
WORKDIR /src
ENV CARGO_HOME=/workdir/.cargo

RUN apt update && apt -y install curl build-essential

Check warning on line 4 in products/bluebell/Dockerfile

View workflow job for this annotation

GitHub Actions / Trunk Check

hadolint(DL3027)

[new] Do not use apt as it is meant to be a end-user tool, use apt-get or apt-cache instead
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y

Check warning on line 5 in products/bluebell/Dockerfile

View workflow job for this annotation

GitHub Actions / Trunk Check

hadolint(DL4006)

[new] Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check
RUN ~/.cargo/bin/rustup update

ENV CARGO_HOME="/root/.cargo/"
ENV PATH="/root/.cargo/bin/:${PATH}"
RUN echo 'source $HOME/.cargo/env' >> $HOME/.bashrc

Check notice on line 10 in products/bluebell/Dockerfile

View workflow job for this annotation

GitHub Actions / Trunk Check

hadolint(SC2086)

[new] Double quote to prevent globbing and word splitting.
ENV PATH="/root/.cargo/bin:${PATH}"

# See https://github.com/cross-rs/cross/issues/260
RUN printf '#!/bin/sh\nexport CARGO_HOME=/opt/cargo\nexec /bin/sh "$@"\n' >/usr/local/bin/sh

RUN rustup target add wasm32-unknown-unknown

Check notice on line 16 in products/bluebell/Dockerfile

View workflow job for this annotation

GitHub Actions / Trunk Check

hadolint(DL3059)

[new] Multiple consecutive `RUN` instructions. Consider consolidation.

RUN apt-get update \
&& apt-get install -y ca-certificates curl gnupg \
&& mkdir -p /etc/apt/keyrings \
Expand All @@ -10,16 +24,21 @@ RUN apt-get update \
&& apt-get update \
&& apt-get install nodejs -y \
&& rm -rf /var/lib/apt/lists/*

RUN npm install -g tailwindcss
RUN curl -sLO https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-linux-x64 \
&& chmod +x tailwindcss-linux-x64 \
&& mv tailwindcss-linux-x64 tailwindcss

RUN cargo install --locked trunk

## Building

COPY . /src/
WORKDIR /src/playground/
ENV NODE_ENV=production
RUN ../tailwindcss -c ./tailwind.config.js -o ./tailwind.css --minify
RUN trunk build

Check notice on line 40 in products/bluebell/Dockerfile

View workflow job for this annotation

GitHub Actions / Trunk Check

hadolint(DL3059)

[new] Multiple consecutive `RUN` instructions. Consider consolidation.

RUN cd playground && NODE_ENV=production ../tailwindcss -c ./tailwind.config.js -o ./tailwind.css --minify
RUN cargo +nightly build --release

FROM nginx:mainline-alpine3.18-slim
EXPOSE 80
Expand Down

0 comments on commit 45be2cd

Please sign in to comment.