-
Notifications
You must be signed in to change notification settings - Fork 249
[dockerhub] Added action for publishing docker image #1421
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
Changes from 1 commit
5872131
24cb513
7d2a3b1
0b7dc5c
e261e41
1126291
fd29286
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: docker-image-release | ||
|
||
on: workflow_dispatch | ||
|
||
jobs: | ||
docker-image-build-push: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v3 | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- | ||
name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- | ||
name: Build and push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: ./examples/docker/ | ||
file: ./examples/docker/Dockerfile | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder if you can simply run There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @LucilleH the output of that command is not entirely the same as the default image I want to publish. |
||
push: true | ||
tags: jetpackio/devbox:latest |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM debian:stable-slim | ||
|
||
# Step 1: Installing dependencies | ||
RUN apt-get update | ||
RUN apt-get -y install bash binutils git xz-utils wget sudo | ||
|
||
# Step 1.5: Setting up devbox user | ||
ENV DEVBOX_USER=devbox | ||
RUN adduser $DEVBOX_USER | ||
RUN usermod -aG sudo $DEVBOX_USER | ||
RUN echo "devbox ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/$DEVBOX_USER | ||
USER $DEVBOX_USER | ||
|
||
# Step 2: Installing Nix | ||
RUN wget --output-document=/dev/stdout https://nixos.org/nix/install | sh -s -- --no-daemon | ||
RUN . ~/.nix-profile/etc/profile.d/nix.sh | ||
|
||
ENV PATH="/home/${DEVBOX_USER}/.nix-profile/bin:$PATH" | ||
|
||
# Step 3: Installing devbox | ||
RUN wget --quiet --output-document=/dev/stdout https://get.jetpack.io/devbox | bash -s -- -f | ||
RUN chown -R "${DEVBOX_USER}:${DEVBOX_USER}" /usr/local/bin/devbox | ||
|
||
CMD ["devbox", "version"] |
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.
You can test this in this PR with
And if it works, change it back to workflow dispatch