-
Notifications
You must be signed in to change notification settings - Fork 49
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
Updates alpine based docker image #515
Conversation
Build is successful: https://us-central1.stateful.com/cell/clt3g3v2b0000fkd12zysze5n The binary is where's supposed to be. Same process works fine for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments.
Alpinedocker build -f Dockerfile.alpine . -t runme:alpine
# Ran on 2024-02-26 21:27:15Z for 2.029s exited with 0
[+] Building 0.0s (0/2) [+] Building 0.1s (2/3) docker:default
=> [internal] load build definition from Dockerfile.alpine 0.1s
=> => transferring dockerfile: 282B 0.0s
=> [internal] load .dockerignore 0.0s
[+] Building 0.3s (3/3) docker:default
=> [internal] load build definition from Dockerfile.alpine 0.1s
=> => transferring dockerfile: 282B 0.0s
=> [internal] load .dockerignore 0.0s
[+] Building 0.3s (10/10) FINISHED docker:default
=> [internal] load build definition from Dockerfile.alpine 0.1s
=> => transferring dockerfile: 282B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/alpine:latest 0.2s
=> [1/5] FROM docker.io/library/alpine:latest@sha256:c5b1261d6d3e43071626931fc004f70149baeba2c8ec672bd4f27761f8e1ad6b 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 29B 0.0s
=> CACHED [2/5] RUN apk --no-cache add ca-certificates 0.0s
=> CACHED [3/5] RUN mkdir -p /opt/var/runme /opt/bin 0.0s
=> CACHED [4/5] COPY runme /opt/bin/runme 0.0s
=> CACHED [5/5] WORKDIR /opt/var/runme 0.0s
=> exporting to image 0.0s
=> => exporting layers 0.0s
=> => writing image sha256:9902fe88457818c8ec5e9ef62ca6b384783f0ffdcf9fd117d8a99c194d562068 0.0s
=> => naming to docker.io/library/runme:alpine 0.0s
docker run -it --rm runme:alpine --version
# Ran on 2024-02-26 21:27:17Z for 2.226s exited with 1
exec /opt/bin/runme: no such file or directory Ubuntudocker build -f Dockerfile.ubuntu . -t runme:ubuntu
# Ran on 2024-02-26 21:27:19Z for 1.848s exited with 0
[+] Building 0.0s (0/2) [+] Building 0.2s (2/3) docker:default
=> [internal] load build definition from Dockerfile.ubuntu 0.0s
=> => transferring dockerfile: 241B 0.0s
=> [internal] load .dockerignore 0.0s
[+] Building 0.3s (3/3) docker:default
=> [internal] load build definition from Dockerfile.ubuntu 0.0s
=> => transferring dockerfile: 241B 0.0s
=> [internal] load .dockerignore 0.0s
[+] Building 0.3s (9/9) FINISHED docker:default
=> [internal] load build definition from Dockerfile.ubuntu 0.0s
=> => transferring dockerfile: 241B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/ubuntu:23.10 0.2s
=> [1/4] FROM docker.io/library/ubuntu:23.10@sha256:f0bb9ee844f7adb284ac036a15469062adbe3a4458c06680216ed73df231cb31 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 29B 0.0s
=> CACHED [2/4] RUN mkdir -p /opt/var/runme /opt/bin 0.0s
=> CACHED [3/4] COPY runme /opt/bin/runme 0.0s
=> CACHED [4/4] WORKDIR /opt/var/runme 0.0s
=> exporting to image 0.0s
=> => exporting layers 0.0s
=> => writing image sha256:088236ec98566d6a6f1e2604d3d14bee55f2610886b4077b0357b68f77dc7a58 0.0s
=> => naming to docker.io/library/runme:ubuntu 0.0s
docker run -it --rm runme:ubuntu --version
# Ran on 2024-02-26 21:27:21Z for 2.297s exited with 0
runme version 3.1.0-rc.0-1-gfe148f3-fe148f3 (fe148f3564da938dcecb9e56e491038cacc08178) on 2024-02-26T21:18:11Z |
@sourishkrout did build the binary using the |
Looks like that worked! Build binaryCGO_ENABLED=0 make build
# Ran on 2024-02-26 21:56:50Z for 3.089s exited with 0
go build -o runme -ldflags="-s -w -X 'github.com/stateful/runme/internal/version.BuildDate=2024-02-26T21:56:52Z' -X 'github.com/stateful/runme/internal/version.BuildVersion=3.1.0-rc.0-1-gfe148f3-fe148f3' -X 'github.com/stateful/runme/internal/version.Commit=fe148f3564da938dcecb9e56e491038cacc08178'" main.go Alpinedocker build -f Dockerfile.alpine . -t runme:alpine
# Ran on 2024-02-26 21:56:53Z for 3.893s exited with 0
[+] Building 0.0s (0/0) [+] Building 0.1s (2/3) docker:default
=> [internal] load build definition from Dockerfile.alpine 0.0s
=> => transferring dockerfile: 282B 0.0s
=> [internal] load .dockerignore 0.0s
[+] Building 0.3s (2/3) docker:default
=> [internal] load build definition from Dockerfile.alpine 0.0s
=> => transferring dockerfile: 282B 0.0s
=> [internal] load .dockerignore 0.0s
[+] Building 0.4s (2/3) docker:default
=> [internal] load build definition from Dockerfile.alpine 0.0s
=> => transferring dockerfile: 282B 0.0s
=> [internal] load .dockerignore 0.0s
[+] Building 0.6s (4/9) docker:default
=> [internal] load build definition from Dockerfile.alpine 0.0s
=> => transferring dockerfile: 282B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/alpine:latest 0.4s
[+] Building 0.7s (4/9) docker:default
=> [internal] load build definition from Dockerfile.alpine 0.0s
=> => transferring dockerfile: 282B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/alpine:latest 0.4s
[+] Building 0.8s (5/9) docker:default
=> [internal] load build definition from Dockerfile.alpine 0.0s
=> => transferring dockerfile: 282B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/alpine:latest 0.4s
[+] Building 1.0s (7/9) docker:default
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/alpine:latest 0.4s
=> [1/5] FROM docker.io/library/alpine:latest@sha256:c5b1261d6d3e43071626931fc004f70149baeba2c8ec672bd4f27761f8e1ad6b 0.0s
=> [internal] load build context 0.3s
=> => transferring context: 23.20MB 0.3s
[+] Building 1.1s (7/9) docker:default
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/alpine:latest 0.4s
=> [1/5] FROM docker.io/library/alpine:latest@sha256:c5b1261d6d3e43071626931fc004f70149baeba2c8ec672bd4f27761f8e1ad6b 0.0s
=> [internal] load build context 0.3s
=> => transferring context: 23.20MB 0.3s
[+] Building 1.3s (7/9) docker:default
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/alpine:latest 0.4s
=> [1/5] FROM docker.io/library/alpine:latest@sha256:c5b1261d6d3e43071626931fc004f70149baeba2c8ec672bd4f27761f8e1ad6b 0.0s
=> [internal] load build context 0.3s
=> => transferring context: 23.20MB 0.3s
[+] Building 1.4s (7/9) docker:default
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/alpine:latest 0.4s
=> [1/5] FROM docker.io/library/alpine:latest@sha256:c5b1261d6d3e43071626931fc004f70149baeba2c8ec672bd4f27761f8e1ad6b 0.0s
=> [internal] load build context 0.3s
=> => transferring context: 23.20MB 0.3s
[+] Building 1.6s (7/9) docker:default
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/alpine:latest 0.4s
=> [1/5] FROM docker.io/library/alpine:latest@sha256:c5b1261d6d3e43071626931fc004f70149baeba2c8ec672bd4f27761f8e1ad6b 0.0s
=> [internal] load build context 0.3s
=> => transferring context: 23.20MB 0.3s
[+] Building 1.7s (9/9) docker:default
=> [internal] load metadata for docker.io/library/alpine:latest 0.4s
=> [1/5] FROM docker.io/library/alpine:latest@sha256:c5b1261d6d3e43071626931fc004f70149baeba2c8ec672bd4f27761f8e1ad6b 0.0s
=> [internal] load build context 0.3s
=> => transferring context: 23.20MB 0.3s
=> CACHED [2/5] RUN apk --no-cache add ca-certificates 0.0s
[+] Building 1.9s (9/10) docker:default
=> [internal] load build context 0.3s
=> => transferring context: 23.20MB 0.3s
=> CACHED [2/5] RUN apk --no-cache add ca-certificates 0.0s
=> CACHED [3/5] RUN mkdir -p /opt/var/runme /opt/bin 0.0s
=> [4/5] COPY runme /opt/bin/runme 0.9s
[+] Building 1.9s (10/10) FINISHED docker:default
=> [internal] load build definition from Dockerfile.alpine 0.0s
=> => transferring dockerfile: 282B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/alpine:latest 0.4s
=> [1/5] FROM docker.io/library/alpine:latest@sha256:c5b1261d6d3e43071626931fc004f70149baeba2c8ec672bd4f27761f8e1ad6b 0.0s
=> [internal] load build context 0.3s
=> => transferring context: 23.20MB 0.3s
=> CACHED [2/5] RUN apk --no-cache add ca-certificates 0.0s
=> CACHED [3/5] RUN mkdir -p /opt/var/runme /opt/bin 0.0s
=> [4/5] COPY runme /opt/bin/runme 0.9s
=> [5/5] WORKDIR /opt/var/runme 0.1s
=> exporting to image 0.2s
=> => exporting layers 0.2s
=> => writing image sha256:702da3a45587bdb155dcae5e72c40ef886381c66a69d0cc9f815dd753c68deba 0.0s
=> => naming to docker.io/library/runme:alpine 0.0s
docker run -it --rm runme:alpine --version
# Ran on 2024-02-26 21:56:57Z for 2.502s exited with 0
runme version 3.1.0-rc.0-1-gfe148f3-fe148f3 (fe148f3564da938dcecb9e56e491038cacc08178) on 2024-02-26T21:56:52Z Ubuntudocker build -f Dockerfile.ubuntu . -t runme:ubuntu
# Ran on 2024-02-26 21:57:00Z for 2.593s exited with 0
[+] Building 0.0s (0/2) [+] Building 0.1s (2/3) docker:default
=> [internal] load build definition from Dockerfile.ubuntu 0.1s
=> => transferring dockerfile: 241B 0.0s
=> [internal] load .dockerignore 0.0s
[+] Building 0.3s (2/3) docker:default
=> [internal] load build definition from Dockerfile.ubuntu 0.1s
=> => transferring dockerfile: 241B 0.0s
=> [internal] load .dockerignore 0.0s
[+] Building 0.4s (5/8) docker:default
=> [internal] load build definition from Dockerfile.ubuntu 0.1s
=> => transferring dockerfile: 241B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/ubuntu:23.10 0.3s
[+] Building 0.6s (6/8) docker:default
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/ubuntu:23.10 0.3s
=> [1/4] FROM docker.io/library/ubuntu:23.10@sha256:f0bb9ee844f7adb284ac036a15469062adbe3a4458c06680216ed73df231cb31 0.0s
=> [internal] load build context 0.0s
[+] Building 0.7s (6/8) docker:default
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/ubuntu:23.10 0.3s
=> [1/4] FROM docker.io/library/ubuntu:23.10@sha256:f0bb9ee844f7adb284ac036a15469062adbe3a4458c06680216ed73df231cb31 0.0s
=> [internal] load build context 0.0s
[+] Building 0.8s (8/8) docker:default
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/ubuntu:23.10 0.3s
=> [1/4] FROM docker.io/library/ubuntu:23.10@sha256:f0bb9ee844f7adb284ac036a15469062adbe3a4458c06680216ed73df231cb31 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 29B 0.0s
[+] Building 1.0s (8/9) docker:default
=> [1/4] FROM docker.io/library/ubuntu:23.10@sha256:f0bb9ee844f7adb284ac036a15469062adbe3a4458c06680216ed73df231cb31 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 29B 0.0s
=> CACHED [2/4] RUN mkdir -p /opt/var/runme /opt/bin 0.0s
=> [3/4] COPY runme /opt/bin/runme 0.4s
[+] Building 1.0s (9/9) FINISHED docker:default
=> [internal] load build definition from Dockerfile.ubuntu 0.1s
=> => transferring dockerfile: 241B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/ubuntu:23.10 0.3s
=> [1/4] FROM docker.io/library/ubuntu:23.10@sha256:f0bb9ee844f7adb284ac036a15469062adbe3a4458c06680216ed73df231cb31 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 29B 0.0s
=> CACHED [2/4] RUN mkdir -p /opt/var/runme /opt/bin 0.0s
=> [3/4] COPY runme /opt/bin/runme 0.4s
=> [4/4] WORKDIR /opt/var/runme 0.0s
=> exporting to image 0.2s
=> => exporting layers 0.2s
=> => writing image sha256:778410bdbecad36f9e4aa3a6cbf7830ef74bc497794c8fcbcef178b3b4455f61 0.0s
=> => naming to docker.io/library/runme:ubuntu 0.0s
docker run -it --rm runme:ubuntu --version
# Ran on 2024-02-26 21:57:02Z for 2.519s exited with 0
runme version 3.1.0-rc.0-1-gfe148f3-fe148f3 (fe148f3564da938dcecb9e56e491038cacc08178) on 2024-02-26T21:56:52Z |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 worked locally
b428f66
to
0f5ffb3
Compare
0f5ffb3
to
5024966
Compare
|
Removes scratch image to be compatible with the alpine base image and supports minimal environment to perform runme for shell scripts.
Closes #510