Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'De-bloating' The Dockerfile #86

Closed
ebebbington opened this issue Nov 12, 2020 · 7 comments
Closed

'De-bloating' The Dockerfile #86

ebebbington opened this issue Nov 12, 2020 · 7 comments

Comments

@ebebbington
Copy link

Hey @hayd, i personally feel the dockerfile logic could be simplified, here is what I use for any deno container:

FROM debian:stable-slim

RUN apt update -y \
  && apt clean \
  && apt install bash curl unzip -y

RUN curl -fsSL https://deno.land/x/install/install.sh | DENO_INSTALL=/usr/local sh -s v1.5.1
RUN export DENO_INSTALL="/usr/bin"
RUN export PATH="$DENO_INSTALL/bin:$PATH"

I also wonder if it's worth adding ARGS support for a deno version? eg:

// your dockerfile
ARG DENO_VERSION

Run install deno | v${DENO_VERSION}

// my docker-compose.yml file
deno:
  args: 
    - DENO_VERSION: 1.4.5 # or whatever the syntax is i can't remember fully
@ebebbington
Copy link
Author

closing as duplicate of #79

@hayd
Copy link
Contributor

hayd commented Nov 13, 2020

Are we talking about de-bloating the image size or the number of lines in the dockerfile?

@ebebbington
Copy link
Author

I’m taking about the number of lines in the Docker file, but the image size would be smaller should Debian slim be used - of course any slim image would do but maybe you have reasons to go with the image you’ve chosen

@hayd
Copy link
Contributor

hayd commented Nov 14, 2020

Happy to use the slim version, if not already!

I am unsure about using number of lines as a metric, and i am nervous about relying on deno install (compared to only github download, which is also a dependency of deno install) - and deno install is where the lines are :) .

@ebebbington
Copy link
Author

Fair enough :) I guess what I’m saying in a nutshell is, the installation could be anything, but I feel the content of the dockerfile could be simplified and achieve the same result, without sacrificing readability

@ebebbington
Copy link
Author

Also someone mentioned they couldn’t get any logs with your dockerfile, but I can’t find the link :/

@ebebbington
Copy link
Author

Don't suppose we could move this discussion to #79?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants